代码修改后的版本,全部提交
This commit is contained in:
94
Mtxfw.shop/Member_wenda_List1.aspx.cs
Normal file
94
Mtxfw.shop/Member_wenda_List1.aspx.cs
Normal file
@@ -0,0 +1,94 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Data;
|
||||
namespace Mtxfw.shop
|
||||
{
|
||||
public partial class Member_wenda_List1 : Mtxfw.Utility.MemberBase
|
||||
{
|
||||
Mtxfw.DAL.Guest daoGuest = new Mtxfw.DAL.Guest();
|
||||
Mtxfw.DAL.user_info daoUser = new Mtxfw.DAL.user_info();
|
||||
protected string strcurrend1 = "", strcurrend2 = "", strcurrend3 = "", strcurrend4 = "", strcurrend5 = "";
|
||||
protected Double UserMoney = 0.00;
|
||||
protected override void OnLoad(EventArgs e)
|
||||
{
|
||||
base.OnLoad(e);
|
||||
|
||||
if (!IsPostBack)
|
||||
{
|
||||
if (Request.QueryString["s"] != null)
|
||||
{
|
||||
if (Request.QueryString["s"].ToString() == "0")
|
||||
{
|
||||
strcurrend2 = "class=\"currend\"";
|
||||
}
|
||||
else if (Request.QueryString["s"].ToString() == "1")
|
||||
{
|
||||
strcurrend3 = "class=\"currend\"";
|
||||
}
|
||||
else if (Request.QueryString["s"].ToString() == "-1")
|
||||
{
|
||||
strcurrend4 = "class=\"currend\"";
|
||||
}
|
||||
else
|
||||
{
|
||||
strcurrend1 = "class=\"currend\"";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
strcurrend1 = "class=\"currend\"";
|
||||
}
|
||||
Mtxfw.Model.user_info ModelUser = daoUser.GetModel(Card);
|
||||
if (ModelUser != null)
|
||||
{
|
||||
UserMoney = ModelUser.umoney14;
|
||||
}
|
||||
myDataBind();
|
||||
Page.Title = "我的回答 - " + GetWebName;
|
||||
}
|
||||
}
|
||||
|
||||
private void myDataBind()
|
||||
{
|
||||
int intPage = 1;
|
||||
string state = "-2", key="";
|
||||
if (Request.QueryString["page"] != null)
|
||||
{
|
||||
intPage = Convert.ToInt32(Request.QueryString["page"].ToString());
|
||||
}
|
||||
System.Text.StringBuilder sb = new System.Text.StringBuilder();
|
||||
sb.Append(" and UserID2=" + Card + "");
|
||||
if (Request.QueryString["key"] != null)
|
||||
{
|
||||
key = Request.QueryString["key"].ToString();
|
||||
}
|
||||
if (Request.QueryString["s"] != null)
|
||||
{
|
||||
state = Request.QueryString["s"].ToString();
|
||||
}
|
||||
if (Request.QueryString["s"] != null)
|
||||
{
|
||||
state = Request.QueryString["s"].ToString();
|
||||
}
|
||||
if (state != "-2")
|
||||
{
|
||||
sb.Append(" and IsShow='" + state + "'");
|
||||
}
|
||||
if (!String.IsNullOrEmpty(key))
|
||||
{
|
||||
sb.Append(" and Message2 like '%" + key + "%'");
|
||||
}
|
||||
MyPager.PageSize = 20;
|
||||
MyPager.RecordCount = daoGuest.GetCount("ttype=1" + sb.ToString());
|
||||
Mtxfw.Utility.Tools.ToBind(Repeater1, daoGuest.GetPager(MyPager, "(select top 1 P_NAME from P_Product as b where b.P_Id=BusinessID) as bName,", "ttype=1" + sb.ToString() + " Order by IsShow2,ID desc"));
|
||||
}
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user