📄 fundsdetail.aspx.cs
字号:
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Collections.Generic;
using YXShop.Common;
using Shop.Web.UI;
namespace YXShop.Web.Admin.Consumer
{
public partial class FundsDetail : System.Web.UI.Page
{
public PageSet ps;
BasePage bp = new BasePage();
protected void Page_Load(object sender, EventArgs e)
{
if (!PowerTree.PowerPass.isPass("003001000", PowerTree.PowerPanel.PowerType.look))
{
bp.PageError("对不起,你没有查看这个页面的权限!", "../index.aspx");
}
AjaxPro.Utility.RegisterTypeForAjax(typeof(YXShop.Web.Admin.Consumer.FundsDetail));
if (!Page.IsPostBack)
{
YXShop.BLL.UserInAndExp datab = new YXShop.BLL.UserInAndExp();
if (Request["qd_ID"] != null)
{
if (!PowerTree.PowerPass.isPass("003001006", PowerTree.PowerPanel.PowerType.other))
{
bp.PageError("对不起,你没有确认此项的权限!","../index.aspx");
}
YXShop.Model.UserInAndExp databz = new YXShop.Model.UserInAndExp();
databz.ID = Convert.ToInt32(Request["qd_ID"].ToString());
databz.Status = 0;
datab.Updatezt(databz);
}
grid();
string strsql = " incomeAndExpStatus = 0";
List<YXShop.Model.UserInAndExp> datas = datab.GetList(strsql);
float strcg = 0;
foreach (YXShop.Model.UserInAndExp dd in datas)
{
int i = datas.Count;
float cdm1 = Convert.ToInt32(dd.AdsumMoney.ToString());
float cdm2;
cdm2 = Convert.ToInt32(dd.AdsumMoney.ToString());
if (i == 0)
{
strcg = cdm1;
}
else
{
strcg = strcg + cdm1;
}
}
string strsqlz = "incomeAndExpStatus = 1";
List<YXShop.Model.UserInAndExp> datasz = datab.GetList(strsqlz);
double strcgz = 0;
foreach (YXShop.Model.UserInAndExp dd in datasz)
{
int i = datasz.Count;
double cdm1 = Convert.ToDouble(dd.AdsumMoney.ToString());
double cdm2;
cdm2 = Convert.ToDouble(dd.AdsumMoney.ToString());
if (i == 0)
{
strcgz = cdm1;
}
else
{
strcgz = strcgz + cdm1;
}
}
Label47.Text = strcg.ToString();
Label48.Text = strcgz.ToString();
}
if ((!IsPostBack) || ((Request["Event"] != null) && (Request["Event"] != "")))
{
grid();
}
}
protected void LinkButton1_Click(object sender, EventArgs e)
{
}
#region 资金列表
private void grid()
{
YXShop.BLL.UserInAndExp dataCAasd = new YXShop.BLL.UserInAndExp();
int pageIndex = Request["pageIndex"] == null ? 0 : int.Parse(Request["pageIndex"]);
if (pageIndex < 0)
{
pageIndex = 0;
}
if ((Request["Event"] == null) || (Request["Event"] == ""))
{
pageIndex = 0;
}
// List<YXShop.Model.UserInAndExp> datas = dataCAasd.GetAllList();
string strsql = "";
List<YXShop.Model.UserInAndExp> datas = dataCAasd.GetList(strsql);
//string aaaaaaa = datas[0].namej.ToString();
dg1.DataSource = datas;
ps = new PageSet(datas.Count, PageSet.PageSize, pageIndex);
if (ps.PageCount <= pageIndex + 1)
{
pageIndex = ps.PageCount - 1;
}
dg1.PageSize = PageSet.PageSize;
dg1.PageIndex = pageIndex;
if (datas.Count < 1)
{
dg1.BackColor = System.Drawing.Color.White;
}
dg1.DataBind();
}
protected void dg1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (!(e.Row.DataItem is YXShop.Model.UserInAndExp))
{
return;
}
YXShop.Model.UserInAndExp data = (e.Row.DataItem as YXShop.Model.UserInAndExp);
if (data != null)
{
e.Row.Cells[1].Text = "<a href='MemberInfo.aspx?ID=" + data.UserID + "'>" + this.UserName(Convert.ToInt32(data.UserID)) + "</a>";
e.Row.Cells[2].Text = this.Users(Convert.ToInt32(data.ID));
e.Row.Cells[3].Text = data.incomeAndExpStatus.ToString() == "0" ? data.AdsumMoney.ToString() : string.Empty;
e.Row.Cells[4].Text = data.incomeAndExpStatus.ToString() == "1" ? data.AdsumMoney.ToString() : string.Empty;
if (data.Status.ToString() == "0")
{
e.Row.Cells[7].Text = (data.Status.ToString() == "1" ? "删除 确认" : "<span style='Color:#666666'>删除 确认</span>") + "<br><a href=\"FundsLook.aspx?Pro_ID=" + data.UserID + "&Pro_IDi=" + data.ID + "\"> 查看</a> ";
}
}
}
protected string Users(int GroupId)
{
string str = "";
YXShop.BLL.UserInAndExp datab = new YXShop.BLL.UserInAndExp();
if (datab.GetModel(GroupId).RemitJoinMode.ToString() == "1")
{
str = "银行汇款";
}
if (datab.GetModel(GroupId).RemitJoinMode.ToString() == "2")
{
str = "虚拟货币";
}
if (datab.GetModel(GroupId).RemitJoinMode.ToString() == "3")
{
str = "现金支付";
}
return str;
}
#endregion
#region 查会员
protected string UserName(int id)
{
string str = "";
YXShop.BLL.UserCommon ucBll = new YXShop.BLL.UserCommon();
List<YXShop.Model.UserCommon> ucList = ucBll.GetListByColumn("UID", id);
if (ucList.Count > 0)
{
str = ucList[0].UserName;
}
return str;
}
#endregion
public string jiequ(string str)
{
string str1;
if (str.Length <= 35)
{
str1 = str;
}
else
{
str1 = str.Substring(0, 34) + "...";
}
return str1;
}
[AjaxPro.AjaxMethod]
public string GiftDel(string id)
{
YXShop.BLL.UserInAndExp dataCA = new YXShop.BLL.UserInAndExp();
YXShop.Model.UserInAndExp datam = new YXShop.Model.UserInAndExp();
dataCA.Delete(Convert.ToInt32(id));
return string.Empty;
}
public string GetPowerStr(string powertype)
{
string reStr = "";
switch (powertype)
{
case "del":
reStr = PowerTree.PowerPass.isPass("003001003", PowerTree.PowerPanel.PowerType.del) ? "t" : "f";
break;
}
return reStr;
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -