110 lines
4.3 KiB
C#
110 lines
4.3 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Web;
|
|
using System.Web.UI;
|
|
using System.Web.UI.WebControls;
|
|
using System.Text;
|
|
using System.Data;
|
|
namespace Mtxfw.VipSite
|
|
{
|
|
public partial class Admin_Member_zbjy_pp_select : Mtxfw.Utility.MemberBase
|
|
{
|
|
Mtxfw.DAL.user_bank daoBank = new Mtxfw.DAL.user_bank();
|
|
Mtxfw.DAL.user_info daoUser = new Mtxfw.DAL.user_info();
|
|
Mtxfw.DAL.user_Results daoResults = new Mtxfw.DAL.user_Results();
|
|
public Mtxfw.Utility.Config config = new Mtxfw.Utility.Config("");
|
|
public string strTitle = "买进未匹配列表";
|
|
public int id = 0;
|
|
public string zje = "0";
|
|
protected override void OnLoad(EventArgs e)
|
|
{
|
|
base.OnLoad(e);
|
|
if (!String.IsNullOrEmpty(Request.QueryString["id"]))
|
|
{
|
|
id = Convert.ToInt32(Request.QueryString["id"].ToString());
|
|
Mtxfw.Model.user_Results rmodel = daoResults.GetModel(id);
|
|
if (rmodel != null)
|
|
{
|
|
zje = rmodel.b0.ToString();
|
|
Mtxfw.Model.user_info umodel = new Mtxfw.DAL.user_info().GetModel(rmodel.MemberId);
|
|
if (umodel != null)
|
|
{
|
|
strTitle = umodel.UserName + "(" + umodel.RealName + "),匹配总金额:" + rmodel.b0.ToString();
|
|
}
|
|
}
|
|
}
|
|
|
|
if (!IsPostBack)
|
|
{
|
|
if (Session["IFPassword"] == null)
|
|
{
|
|
Response.Redirect("/Member_IFPassword.aspx?Url=/Admin_Member_zbjy_pp_select.aspx");
|
|
}
|
|
if (IFStores != 1)
|
|
{
|
|
Mtxfw.Utility.Tools.Message("您没有权限!", "/gl.aspx");
|
|
}
|
|
foreach (KeyValuePair<int, string> kv in Mtxfw.Utility.Common.GetTems())
|
|
{
|
|
Drop_Tem.Items.Add(new ListItem(kv.Value, kv.Key.ToString()));
|
|
}
|
|
Page.Title = strTitle + " - " + GetWebName;
|
|
Data_Bind();
|
|
}
|
|
MyPager.PageChanged += delegate(object s, EventArgs ex)
|
|
{
|
|
Data_Bind();
|
|
};
|
|
|
|
}
|
|
|
|
protected void Data_Bind()
|
|
{
|
|
|
|
System.Text.StringBuilder sb = new System.Text.StringBuilder();
|
|
String tem = HttpUtility.UrlDecode(Request.QueryString["tem"]);
|
|
String MemberId = Request.QueryString["MemberId"];
|
|
String key = Request.QueryString["key"];
|
|
String SJ = Request.QueryString["SJ"];
|
|
String SJ2 = Request.QueryString["SJ2"];
|
|
sb.Append("utype=12 and IFDelete=0 And b2=1 And b8=0 And b12=0 And b14=0");
|
|
if (!String.IsNullOrEmpty(tem))
|
|
{
|
|
sb.Append(" and Sended=" + tem + "");
|
|
Drop_Tem.SelectedValue = tem;
|
|
}
|
|
|
|
if (!String.IsNullOrEmpty(SJ) && !String.IsNullOrEmpty(SJ2))
|
|
{
|
|
sb.Append("and (addtime between '" + SJ + " 00:00:00' and '" + SJ2 + " 23:59:59') ");
|
|
}
|
|
if (!String.IsNullOrEmpty(MemberId))
|
|
{
|
|
sb.Append(" and MemberId=" + MemberId);
|
|
}
|
|
if (!String.IsNullOrEmpty(key))
|
|
{
|
|
key = key.Trim();
|
|
sb.Append(" and MemberId=(Select id from user_info b where b.UserName='" + key + "')");
|
|
}
|
|
string groupby = "";
|
|
string strOrder = "addtime asc";
|
|
|
|
int Start = 0;
|
|
int Limit = 0;
|
|
Int32 Recount = 0;
|
|
MyPager.PageSize = 100;
|
|
Start = MyPager.PageSize * (MyPager.CurrentPageIndex - 1);
|
|
Limit = MyPager.PageSize;
|
|
DataSet dss = daoResults.GetDataSet(groupby, strOrder, "*,(Select UserName From user_info b Where b.Id=MemberId) as MemberName,(Select realname From user_info b Where b.Id=MemberId) as realname,(Select uLevel8 From user_info b Where b.Id=MemberId) as uLevel8", "", sb.ToString(), Start, Limit, out Recount);
|
|
Mtxfw.Utility.Tools.ToBind(Repeater1, dss.Tables[1]);
|
|
MyPager.RecordCount = Recount;
|
|
if (MyPager.RecordCount < 100)
|
|
{
|
|
MyPager.Visible = false;
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
} |