⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fundsdetailmx.aspx.cs

📁 易想商城系统
💻 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;
namespace YXShop.Web.Admin.Consumer
{
    public partial class FundsDetailmx : System.Web.UI.Page
    {
        public PageSet ps;
        protected void Page_Load(object sender, EventArgs e)
        {
            AjaxPro.Utility.RegisterTypeForAjax(typeof(YXShop.Web.Admin.Consumer.FundsDetailmx));
            if (!Page.IsPostBack)
            {
                YXShop.BLL.UserInAndExp datab = new YXShop.BLL.UserInAndExp();
                if (Request["qd_ID"] != null)
                {
                    YXShop.Model.UserInAndExp databz = new YXShop.Model.UserInAndExp();
                    databz.ID = Convert.ToInt32(Request["qd_ID"].ToString());
                    databz.Status = 0;
                    datab.Updatezt(databz);
                }
                grid();
                if (Request["type"] == "sr")
                {
                    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;
                        }
                    }
                    Label47.Text = strcg.ToString();
                    Label48.Visible = false;
                    Label50.Visible = false;
                }
                if (Request["type"] == "zc")
                {
                    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;
                        }

                    }
                    Label48.Text = strcgz.ToString();
                    Label47.Visible = false;
                    Label49.Visible = false;
                }
                if (Request["type"] == "yqd")
                {
                    string strsql = " incomeAndExpStatus = 0 and Status = 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 and Status = 0";
                    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;
                        }

                    }
                    Label48.Text = strcgz.ToString();

                    Label47.Text = strcg.ToString();
                }
                if (Request["type"] == "wqd")
                {
                    string strsql = " incomeAndExpStatus = 0 and Status = 1";
                    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 and Status = 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;
                        }

                    }
                    Label48.Text = strcgz.ToString();

                    Label47.Text = strcg.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;
            }
            string strsql = "";
            if (Request["type"] == "sr")
            {
                 strsql = "incomeAndExpStatus = 0";
            }
            if (Request["type"] == "zc")
            {
                 strsql = "incomeAndExpStatus = 1";
            }
            if (Request["type"] == "yqd")
            {
                 strsql = "Status = 0";
            }
            if (Request["type"] == "wqd")
            {
                 strsql = "Status = 1";
            }
            List<YXShop.Model.UserInAndExp> datas = dataCAasd.GetList(strsql);
            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?Pro_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" ? "删除&nbsp;确认" : "<span style='Color:#666666'>删除&nbsp;确认</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;
        }
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -