153 lines
6.1 KiB
C#
153 lines
6.1 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_Commissionmx0 : 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_jl2 daojl2 = new Mtxfw.DAL.user_Results_jl2();
|
|
Mtxfw.Utility.Config config = new Mtxfw.Utility.Config("");
|
|
public string strTitle = "增值记录";
|
|
|
|
public int gtype = 0, IFGR=0;
|
|
protected override void OnLoad(EventArgs e)
|
|
{
|
|
base.OnLoad(e);
|
|
string hostname = Request.Url.Host;
|
|
|
|
if (!IsPostBack)
|
|
{
|
|
if (Session["IFPassword"] == null)
|
|
{
|
|
Response.Redirect("/Member_IFPassword.aspx?Url=/Admin_Member_Commissionmx0.aspx");
|
|
}
|
|
if (IFStores != 1)
|
|
{
|
|
Mtxfw.Utility.Tools.Message("您没有权限!", "/gl.aspx");
|
|
}
|
|
if (MemberJS.IndexOf(strTitle) == -1)
|
|
{
|
|
Mtxfw.Utility.Tools.Message("您没有权限!", "/gl.aspx");
|
|
}
|
|
|
|
|
|
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 MemberId = Request.QueryString["MemberId"];
|
|
String key = Request.QueryString["key"];
|
|
String SJ = Request.QueryString["SJ"];
|
|
String SJ2 = Request.QueryString["SJ2"];
|
|
String state = Request.QueryString["state"];
|
|
sb.Append("gtype=" + gtype + " and utype=9");
|
|
|
|
sb.Append(" and IFDelete=0");
|
|
|
|
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);
|
|
IFGR = 1;
|
|
}
|
|
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 desc,id desc";
|
|
|
|
int Start = 0;
|
|
int Limit = 0;
|
|
Int32 Recount = 0;
|
|
MyPager.PageSize = 100;
|
|
Start = MyPager.PageSize * (MyPager.CurrentPageIndex - 1);
|
|
Limit = MyPager.PageSize;
|
|
DataSet dss = daojl2.GetDataSet(groupby, strOrder, "ID,MemberId2,MinNumber,MaxNumber,Addmoney,Cutmoney,OrdersID,PayID,Totalmoney,Totalmoney0,addtime,BZContent,Seef,seeftime,MemberId,(Select UserName From user_info b Where b.Id=MemberId) as MemberName,(Select realname From user_info b Where b.Id=MemberId) as realname", "", sb.ToString(), Start, Limit, out Recount);
|
|
Mtxfw.Utility.Tools.ToBind(Repeater1, dss.Tables[1]);
|
|
MyPager.RecordCount = Recount;
|
|
if (MyPager.RecordCount == 0)
|
|
{
|
|
MyPager.Visible = false;
|
|
}
|
|
DataSet ds = daojl2.GetList1("sum(Addmoney) as Addmoney,sum(Totalmoney0) as Totalmoney0", sb.ToString());
|
|
if (ds.Tables[0].Rows.Count > 0)
|
|
{
|
|
if (ds.Tables[0].Rows[0]["Addmoney"].ToString() != "")
|
|
{
|
|
Label_b1.Text = Convert.ToDouble(ds.Tables[0].Rows[0]["Addmoney"]).ToString("0.####");
|
|
Label_b2.Text = Convert.ToDouble(ds.Tables[0].Rows[0]["Totalmoney0"]).ToString("0.####");
|
|
}
|
|
else
|
|
{
|
|
Label_b1.Text = "0";
|
|
Label_b2.Text = "0";
|
|
}
|
|
}
|
|
else
|
|
{
|
|
Label_b1.Text = "0";
|
|
Label_b2.Text = "0";
|
|
}
|
|
ds.Clear();
|
|
}
|
|
protected void Run_Click(object s, System.EventArgs e)
|
|
{
|
|
CheckBox Check = new CheckBox();
|
|
string strs = seclect_Drop.SelectedItem.Value;
|
|
foreach (RepeaterItem Item in Repeater1.Items)
|
|
{
|
|
//在行中查找到该单选框
|
|
Check = (CheckBox)Item.FindControl("checka");
|
|
Int64 strID = Int64.Parse(Check.CssClass);
|
|
if (Check.Checked == true)
|
|
{
|
|
Mtxfw.Model.user_Results_jl2 mr = daojl2.GetModel(strID);
|
|
if (mr != null)
|
|
{
|
|
if (strs == "3")
|
|
{
|
|
|
|
Mtxfw.Model.user_info umodel = daoUser.GetModel(mr.MemberId);
|
|
if (umodel != null)
|
|
{
|
|
daojl2.UpdateSeef("IFDelete", 1, "IFDeleteTime", DateTime.Now, strID);
|
|
Model.User_CZ_log logmodel = new Model.User_CZ_log();
|
|
logmodel.MemberId = Card;
|
|
logmodel.AddTime = DateTime.Now;
|
|
logmodel.IP = Mtxfw.Utility.Common.GetIP;
|
|
logmodel.Body = "删除" + strTitle + ",订单号为" + mr.PayID + ",用户名为" + umodel.UserName + ",时间为" + mr.addtime;
|
|
logmodel.UType = 0;
|
|
logmodel.gtype = gtype;
|
|
new DAL.User_CZ_log().Add(logmodel);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
Response.Redirect(Request.Url.AbsoluteUri);
|
|
}
|
|
}
|
|
} |