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

📄 exchangebank.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.BLL;
using YXShop.Common;

namespace YXShop.Web.Admin.Consumer
{
    public partial class ExchangeBank : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (Request["hydhid"] != null)
                {
                    YXShop.BLL.MemberInfo dataCA = new YXShop.BLL.MemberInfo();
                    List<YXShop.Model.MemberInfo> data = dataCA.GetListByColumn("UID", Convert.ToInt32(Request["hydhid"]));

                    YXShop.BLL.UserCommon ucBll = new YXShop.BLL.UserCommon();
                    List<YXShop.Model.UserCommon> ucList = ucBll.GetListByColumn("UID", Request["hydhid"]);
                    if (ucList.Count > 0)
                    {
                        Label1.Text = ucList[0].UserName;
                    }
                    //Label1.Text = data[0].uUserName;
                    
                    YXShop.BLL.MemberRand dataCAz = new YXShop.BLL.MemberRand();
                    List<YXShop.Model.MemberRand> data1 = dataCAz.GetzId(Convert.ToInt32(data[0].uGroupId.ToString()));
                    try
                    {
                        Label2.Text = data1[0].Rank_name;
                    }
                    catch
                    {
                        Label2.Text = "普通会员";
                    }
                    Label3.Text = data[0].fSurplusCapital.ToString();
                    Label4.Text = data[0].fUsableStamps.ToString();
                    Label5.Text = data[0].fIntegral.ToString();
                    string dateDiff = "0";
                    if (Convert.ToDateTime(data[0].PeriodOfValidity) > System.DateTime.Now)
                    {

                        TimeSpan ts1 = new TimeSpan(Convert.ToDateTime(data[0].PeriodOfValidity).Ticks);
                        TimeSpan ts2 = new TimeSpan(DateTime.Now.Ticks);
                        TimeSpan ts = ts1.Subtract(ts2).Duration();
                        dateDiff = ts.Days.ToString();
                    }
                    Label6.Text = dateDiff;
                }
                YXShop.BLL.BankAccount yx = new YXShop.BLL.BankAccount();
                int i = 0, j = 0;
                DropDownList1.DataSource = yx.GetAll(1,20,out i,out j);
                this.DropDownList1.DataTextField = "BC_Bankac";
                this.DropDownList1.DataValueField = "BC_Id"; 
                DropDownList1.DataBind();
            }
        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            YXShop.BLL.UserInAndExp ff = new YXShop.BLL.UserInAndExp();
            YXShop.Model.UserInAndExp mod = new YXShop.Model.UserInAndExp();
            mod.incomeAndExpStatus = 0;
            mod.RemitJoinMode = 1;
            mod.NoteName = Session["AdminName"]!=null?Session["AdminName"].ToString():"";
            mod.NoteDate = Convert.ToDateTime(DateTime.Now.ToLongDateString());
            mod.BosomNote = TextBox3.Text.Trim();
            mod.Remark = TextBox2.Text.Trim();
            mod.AdsumMoney = Convert.ToDecimal(TextBox1.Text.Trim());
            mod.AdsumMoneyDate = Convert.ToDateTime(dpEnd.Date.ToShortDateString());
            if (CheckBox1.Checked == true)
            {
                if (TextBox4.Text == string.Empty)
                {
                    TextBox4.Text = "0";
                }
                mod.PresentTicket = Convert.ToDecimal(TextBox4.Text.Trim());
            }
            else
            {
                mod.PresentTicket = 0;
            }
            mod.RemitJoinBank = DropDownList1.SelectedItem.ToString();
            mod.InformMode = "";
            mod.Status = 0;
            mod.UserID = Convert.ToInt32(Request["hydhid"].ToString());
            YXShop.BLL.MemberInfo dataCA = new YXShop.BLL.MemberInfo();
            List<YXShop.Model.MemberInfo> data = dataCA.GetListByColumn("uUserId", Convert.ToInt32(Request["hydhid"]));
            dataCA.Amend(Convert.ToInt32(Request["hydhid"]), "fSurplusCapital", Convert.ToDecimal(data[0].fSurplusCapital) + Convert.ToDecimal(this.TextBox1.Text));
            ff.Add(mod);
            Response.Redirect("../Succeed/SucceedMember.aspx?Key=添加银行汇款&UserID=" + Request["hydhid"].ToString() + "");
        }
    }
}

⌨️ 快捷键说明

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