Exemplo n.º 1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        bzCurrency = CommonDataBLL.GetStandard();
        huilv      = (AjaxClass.GetCurrency(Convert.ToInt32(bzCurrency), Convert.ToInt32(Session["Default_Currency"].ToString())));
        var hkid = Request.QueryString["hkid"];
        var hybh = Session["Member"].ToString();

        if (!IsPostBack)
        {
            //获取标准币种

            //string dt_one = "select w.id,w.hkid, w.bankcard,w.bankname,w.shenHestate,w.WithdrawMoney,m.name,w.auditingtime from memberinfo m, withdraw w,remittances r where m.Number=w.number and w.hkid=r.ID and (w.shenhestate=11 or w.shenhestate=2) order by auditingtime desc";
            //DataTable dt = DAL.DBHelper.ExecuteDataTable(dt_one);
            //Hkid.Value = hkid;
            //rep_km.DataSource = dt;
            //rep_km.DataBind();

            string dt_one = "select * from (select w.id,w.hkid,w.bankcard,w.bankname,w.shenHestate,w.WithdrawMoney,m.name,RemittancesDate,w.auditingtime,m.Number from memberinfo m, withdraw w,remittances r where m.Number = w.number and w.hkid = r.ID and  (w.shenhestate=11 or w.shenhestate=2)   and m.Number!='" + hybh + "' and r.RemitNumber='" + hybh + "' union select id,ID as hkid,ImportNumber as bankcard,ImportBank as bankname,shenhestate,RemitMoney as WithdrawMoney,name,RemittancesDate,ReceivablesDate as auditingtime,RemitNumber as Number from Remittances where isjl = 1 and  (shenhestate=11 or shenhestate=2) and RemitNumber='" + hybh + "'  ) as t order by auditingtime desc";
            //
            DataTable dt = DAL.DBHelper.ExecuteDataTable(dt_one);
            Hkid.Value = hkid;
            var count = dt.Rows.Count;
            rep_km.DataSource = dt;
            rep_km.DataBind();
        }
    }
Exemplo n.º 2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Permissions.ComRedirect(Page, Permissions.redirUrl);
        Response.Cache.SetExpires(DateTime.Now);
        Permissions.CheckManagePermission(EnumCompanyPermission.BalanceDetialQuery);

        Response.Cache.SetExpires(DateTime.Now);

        if (!IsPostBack)
        {
            this.Panel1.Style.Add("display", "none");

            //绑定货币
            if (Session["Default_Currency"] == null)
            {
                Session["Default_Currency"] = "";
            }


            CommonDataBLL.BindCurrency_IDListBZ(this.DropCurrency, Session["Default_Currency"].ToString());

            double dpCurrency = AjaxClass.GetCurrency(Convert.ToInt32(DropCurrency.SelectedValue), Convert.ToInt32(DropCurrency.SelectedValue));

            Session["rate"] = dpCurrency;
            getTypeBind(Session["Company"].ToString());
            coll();
        }
        Translations();
    }
Exemplo n.º 3
0
    //绑定信息
    public void readInfo()
    {
        MemberInfoModel memberInfoModel = MemberInfoModifyBll.getMemberInfo(Session["Member"].ToString());


        DataTable dt = DetialQueryBLL.GetMemberInfoBalanceByNumber(ExpectNum, Session["Member"].ToString());

        if (dt.Rows.Count > 0)
        {
            lblNewPeople.Text = dt.Rows[0]["CurrentNewNetNum"].ToString();
            if (AjaxClass.GetCurrency(Convert.ToInt32(bzCurrency), Convert.ToInt32(Session["Default_Currency"].ToString())) == 0)
            {
                lblNewYeji.Text         = "0.00";
                lblTotalYeji.Text       = "0.00";
                lblCurrentOneMark2.Text = "0.00";
                lblTotalOneMark2.Text   = "0.00";
            }
            else
            {
                lblNewYeji.Text         = (double.Parse(dt.Rows[0]["CurrentTotalNetRecord"].ToString())).ToString("0.00");
                lblTotalYeji.Text       = (double.Parse(dt.Rows[0]["TotalNetRecord"].ToString())).ToString("0.00");
                lblCurrentOneMark2.Text = (double.Parse(dt.Rows[0]["CurrentOneMark2"].ToString())).ToString("0.00");
                lblTotalOneMark2.Text   = (double.Parse(dt.Rows[0]["TotalOneMark2"].ToString())).ToString("0.00");
            }
            lblTotalPeople.Text = dt.Rows[0]["TotalNetNum"].ToString();
        }
    }
Exemplo n.º 4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Permissions.MemRedirect(Page, Permissions.redirUrl);
        //检查店铺权限
        Response.Cache.SetExpires(DateTime.Now);
        // Permissions.CheckMemberPermission();//检测是否已登录
        int bzCurrency = CommonDataBLL.GetStandard();

        if (!IsPostBack)
        {
            if (Request.QueryString["byy"] != null)
            {
                double currency = AjaxClass.GetCurrency(int.Parse(Session["Default_Currency"] == null ? bzCurrency.ToString() : Session["Default_Currency"].ToString()));
                ViewState["url"] = Request.UrlReferrer.ToString();
                string orderid = Request.QueryString["orderId"];
                if (orderid.Length > 0)
                {
                    BindData(orderid);
                }

                BLL.Registration_declarations.MemberOrderBLL memberOrderBLL = new BLL.Registration_declarations.MemberOrderBLL();
                DataTable dt = memberOrderBLL.GetMemberByOrderID1(orderid, currency);

                gvorder.DataSource = dt;
                gvorder.DataBind();
            }
        }
        Transllations();
    }
Exemplo n.º 5
0
    public string GetLiuLanPro(string oType)
    {
        oType = Session["LUOrder"].ToString().Split(',')[1];

        int mType1 = 0;

        if (HttpContext.Current.Session["Company"] != null)
        {
            mType1 = 1;
        }
        else if (HttpContext.Current.Session["Store"] != null)
        {
            mType1 = 2;
        }
        else if (HttpContext.Current.Session["Member"] != null)
        {
            mType1 = 3;
        }
        string number = "";

        if (Session["mbreginfo"] == null)
        {
            number = ((Model.MemberInfoModel)Session["fxMemberModel"]).Number;
        }
        else
        {
            number = ((Model.MemberInfoModel)Session["mbreginfo"]).Number;
        }
        string sql = "select top 7 * from MemShopCart,product where MemShopCart.proid=product.productid and memBh=@memBh and mType=@mType and odType=@odType  order by id desc";

        SqlParameter[] sp = new SqlParameter[] {
            new SqlParameter("@memBh", number),
            new SqlParameter("@mType", SqlDbType.Int),
            new SqlParameter("@odType", SqlDbType.Int)
        };
        sp[1].Value = mType1;
        sp[2].Value = Convert.ToInt32(oType);
        DataTable dt = DAL.DBHelper.ExecuteDataTable(sql, sp, CommandType.Text);

        System.Text.StringBuilder sb = new System.Text.StringBuilder();

        if (dt.Rows.Count == 0)
        {
            sb.Append("");
        }
        int    bzCurrency = CommonDataBLL.GetStandard();
        double currency   = AjaxClass.GetCurrency(int.Parse(Session["Default_Currency"] == null ? bzCurrency.ToString() : Session["Default_Currency"].ToString()));

        for (int i = 0; i < dt.Rows.Count; i++)
        {
            sb.Append(@" <div class='prcClassImg'><h6 class='pImages' style='margin-right: 30px;'><img src='" + FormatURL(dt.Rows[i]["ProductID"]) + "' width='64' height='54' /></h6> <ul>	<li><a href='#'>" + dt.Rows[i]["productname"].ToString() + "</a></li>"
                      + "<li><a href='#'>价格:" + (Convert.ToDouble(dt.Rows[i]["PreferentialPrice"]) * currency).ToString() + "</a></li> <li><a href='#'>PV:" + Convert.ToDouble(dt.Rows[i]["PreferentialPV"]).ToString() + "</a></li> </ul> <div style='clear:both'></div>  </div>");
            //            sb.Append(@"<dl>
            //              <dd><img src='" + FormatURL(dt.Rows[i]["ProductID"]) + "' width='55' height='55' /></dd><dt>" + dt.Rows[i]["productname"].ToString() + "<br />金额:¥" + Convert.ToDouble(dt.Rows[i]["PreferentialPrice"]).ToString("0.00") + "<br />PV:" + Convert.ToDouble(dt.Rows[i]["PreferentialPV"]).ToString("0.00") + "</dt></dl>");
        }

        return(sb.ToString());
    }
Exemplo n.º 6
0
    protected void Page_Load(object sender, EventArgs e)
    {
        //获取标准币种
        bzCurrency = CommonDataBLL.GetStandard();
        huilv      = (AjaxClass.GetCurrency(Convert.ToInt32(bzCurrency), Convert.ToInt32(Session["Default_Currency"].ToString())));
        string dt_one = "";
        var    hkid   = Request.QueryString["hkid"];
        var    hybh   = Session["Member"].ToString();
        var    time   = DateTime.Now.AddHours(-10);

        Hkid.Value = hkid;
        if (hybh == "8888888888")
        {
            dt_one = "select * from (select w.id,w.hkid,w.bankcard,w.bankname,w.shenHestate,w.WithdrawMoney,m.name,RemittancesDate,w.auditingtime,m.Number from memberinfo m, withdraw w,remittances r where m.Number = w.number and w.hkid = r.ID and w.shenhestate in(1, 3)and  m.Number!='" + hybh + "' and w.auditingtime>='" + time + "' union select id,ID as hkid,ImportNumber as bankcard,ImportBank as bankname,shenhestate,RemitMoney as WithdrawMoney,name,RemittancesDate,ReceivablesDate as auditingtime,RemitNumber as Number from Remittances where isjl = 1 and shenhestate in(1, 3) and ReceivablesDate>='" + time + "' ) as t order by auditingtime desc";
        }//
        else
        {
            dt_one = "select * from (select w.id,w.hkid,w.bankcard,w.bankname,w.shenHestate,w.WithdrawMoney,m.name,RemittancesDate,w.auditingtime,m.Number from memberinfo m, withdraw w,remittances r where m.Number = w.number and w.hkid = r.ID and w.shenhestate in(1, 3) and  m.Number!='" + hybh + "'  and   w.auditingtime>='" + time + "'    and  r.RemitNumber='" + hybh + "'  union select id,ID as hkid,ImportNumber as bankcard,ImportBank as bankname,shenhestate,RemitMoney as WithdrawMoney,name,RemittancesDate,ReceivablesDate as auditingtime,RemitNumber as Number from Remittances where isjl = 1 and shenhestate in(1, 3) and ReceivablesDate>='" + time + "'   ) as t order by auditingtime desc";
        }
        //3-16去掉时间限制,超时的也显示
        //

        DataTable dt    = DAL.DBHelper.ExecuteDataTable(dt_one);
        var       count = dt.Rows.Count;

        rep_km.DataSource = dt;
        rep_km.DataBind();



        //string sql1 = "select * from Withdraw where hkid='" + hkid + "'";
        //DataTable dt1 = DAL.DBHelper.ExecuteDataTable(sql1);


        //if (dt1.Rows.Count == 0)
        //{
        //    rep_km1.Visible = true;
        //    rep_km.Visible = false;
        //    dt_one = " select top(1)* from companybank  order by ID desc";
        //    DataTable dt = DAL.DBHelper.ExecuteDataTable(dt_one);
        //    rep_km1.DataSource = dt;
        //    rep_km1.DataBind();
        //}
        //else
        //{
        //    rep_km.Visible = true;
        //    rep_km1.Visible = false;
        //    dt_one = "select w.id,w.hkid,w.bankcard,w.bankname,w.shenHestate,w.WithdrawMoney,m.name,RemittancesDate,w.auditingtime from memberinfo m, withdraw w,remittances r where m.Number=w.number and w.hkid=r.ID and w.shenhestate=3 and w.auditingtime>='" + time + "' order by w.auditingtime  desc";
        //    DataTable dt = DAL.DBHelper.ExecuteDataTable(dt_one);
        //    rep_km.DataSource = dt;
        //    rep_km.DataBind();
        //}



        //this.ucPagerMb1.PageInit(dt_one, "rep_km");
    }
Exemplo n.º 7
0
    protected void Page_Load(object sender, EventArgs e)
    {
        //获取标准币种
        bzCurrency = CommonDataBLL.GetStandard();
        huilv      = (AjaxClass.GetCurrency(Convert.ToInt32(bzCurrency), Convert.ToInt32(Session["Default_Currency"].ToString())));
        if (!this.IsPostBack)
        {
            var HkID       = Request.QueryString["HkID"];
            var bishu      = Request.QueryString["bishu"];
            var RemitMoney = (Convert.ToDouble(Request.QueryString["RemitMoney"]) * huilv).ToString("f2");
            int bishu1     = int.Parse(bishu);
            rmoney.Text   = RemitMoney;
            rmoney1.Value = RemitMoney;
            hkid.Value    = HkID;
            DataTable dt = null;// RemittancesBLL.jinliucx(HkID);
            bishucount.Text = (dt.Rows.Count).ToString();

            string    sm      = "select describe from JLparameter where jlcid=8";
            DataTable sm2     = DAL.DBHelper.ExecuteDataTable(sm);
            var       shuomin = sm2.Rows[0]["describe"].ToString();
            Label2.Text = shuomin;


            if (bishucount.Text == "0")
            {
                bishucount.Text = "1";

                string    dt_one1 = "update Remittances set Ispipei=1 where ID=" + HkID;
                DataTable dt3     = DAL.DBHelper.ExecuteDataTable(dt_one1);

                DataTable dt_one3        = DAL.DBHelper.ExecuteDataTable("select * from remittances where ID=" + HkID);
                string    RemittancesID  = dt_one3.Rows[0]["RemittancesID"].ToString(); //汇款单号
                string    RemBankBook    = dt_one3.Rows[0]["ImportNumber"].ToString();  //汇款单号
                string    RemBankname    = dt_one3.Rows[0]["name"].ToString();          //汇款单号
                string    RemBankaddress = dt_one3.Rows[0]["ImportBank"].ToString();    //汇款单号
                RemittancesDAL.WithdrawMoney(Session["Member"].ToString(), Convert.ToDouble(RemitMoney) / huilv, RemittancesID, RemBankBook, RemBankname, RemBankaddress);

                string    dt_one = "select top(1) * from companybank order by ID desc";
                DataTable dt2    = DAL.DBHelper.ExecuteDataTable(dt_one);
                rep_km.Visible     = false;
                rep_km1.Visible    = true;
                rep_km1.DataSource = dt2;
                rep_km1.DataBind();
            }
            else
            {
                rep_km1.Visible   = false;
                rep_km.Visible    = true;
                rep_km.DataSource = dt;
                rep_km.DataBind();
            }
            Translations();
        }
    }
Exemplo n.º 8
0
    /*-------------------------------------------------------------------------------------------------------------------------------------------------------*/
    public void readBonus()
    {
        int       maxqs   = BLL.CommonClass.CommonDataBLL.GetMaxqishu();
        double    curreny = AjaxClass.GetCurrency(Convert.ToInt32(bzCurrency), Convert.ToInt32(Session["Default_Currency"].ToString()));
        DataTable dt      = MemberInfoModifyBll.getBonusTable(maxqs, Session["Member"].ToString());//第一个参数期数

        if (dt.Rows.Count > 0)
        {
            if (curreny == 0)
            {
                //this.Label1.Text = "0";
                this.Label1.Text  = "0";
                this.Label2.Text  = "0";
                this.Label3.Text  = "0";
                this.Label4.Text  = "0";
                this.Label5.Text  = "0";
                this.Label6.Text  = "0";
                this.Label7.Text  = "0";
                this.Label8.Text  = "0";
                this.Label9.Text  = "0";
                this.Label10.Text = "0";
            }
            else
            {
                //this.Label1.Text = (Convert.ToDouble(dt.Rows[0]["Bonus0"]) / AjaxClass.GetCurrency(Convert.ToInt32(bzCurrency), Convert.ToInt32(Session["Default_Currency"].ToString()))).ToString("0.00");
                this.Label1.Text = (Convert.ToDouble(dt.Rows[0]["Bonus1"]) *
                                    AjaxClass.GetCurrency(Convert.ToInt32(bzCurrency), Convert.ToInt32(Session["Default_Currency"].ToString()))).ToString("0.00");
                this.Label2.Text  = (Convert.ToDouble(dt.Rows[0]["Bonus2"]) * curreny).ToString("0.00");
                this.Label3.Text  = (Convert.ToDouble(dt.Rows[0]["Bonus3"]) * curreny).ToString("0.00");
                this.Label4.Text  = (Convert.ToDouble(dt.Rows[0]["Bonus4"]) * curreny).ToString("0.00");
                this.Label5.Text  = (Convert.ToDouble(dt.Rows[0]["Bonus5"]) * curreny).ToString("0.00");
                this.Label6.Text  = (Convert.ToDouble(dt.Rows[0]["Kougl"]) * curreny).ToString("0.00");
                this.Label7.Text  = (Convert.ToDouble(dt.Rows[0]["Koufl"]) * curreny).ToString("0.00");
                this.Label8.Text  = (Convert.ToDouble(dt.Rows[0]["Koufx"]) * curreny).ToString("0.00");
                this.Label9.Text  = (Convert.ToDouble(dt.Rows[0]["CurrentSolidSend"]) * curreny).ToString("0.00");
                this.Label10.Text = (Convert.ToDouble(dt.Rows[0]["CurrentSolidSend"]) * curreny).ToString("0.00");
            }
        }
        else
        {
            //this.Label1.Text = "0.00";
            this.Label1.Text  = "0.00";
            this.Label2.Text  = "0.00";
            this.Label3.Text  = "0.00";
            this.Label4.Text  = "0.00";
            this.Label5.Text  = "0.00";
            this.Label6.Text  = "0.00";
            this.Label7.Text  = "0.00";
            this.Label8.Text  = "0.00";
            this.Label9.Text  = "0.00";
            this.Label10.Text = "0.00";
        }
    }
Exemplo n.º 9
0
    protected void Page_Load(object sender, EventArgs e)
    {
        //获取标准币种
        bzCurrency = CommonDataBLL.GetStandard();
        huilv      = (AjaxClass.GetCurrency(Convert.ToInt32(bzCurrency), Convert.ToInt32(Session["Default_Currency"].ToString())));
        var       id     = Request.QueryString["id"];
        string    dt_one = "select * from Withdraw where shenhestate=11 and HkDj=1 and IsJL=1 and HkKhname is not  null and id=" + id;
        DataTable dt     = DAL.DBHelper.ExecuteDataTable(dt_one);

        rep_km.DataSource = dt;
        rep_km.DataBind();
    }
Exemplo n.º 10
0
    protected void Page_Load(object sender, EventArgs e)
    {
        //获取标准币种
        bzCurrency = CommonDataBLL.GetStandard();
        huilv      = (AjaxClass.GetCurrency(Convert.ToInt32(bzCurrency), Convert.ToInt32(Session["Default_Currency"].ToString())));
        var       hybh   = Session["Member"].ToString();
        string    dt_one = "select id,hkid,Khname,bankcard,bankname,shenHestate,Ppje,WithdrawTime from withdraw where shenhestate=20 and IsJL=1 and number='" + hybh + "' order by WithdrawTime desc";//and HkDj=1 and TxDj=1
        DataTable dt     = DAL.DBHelper.ExecuteDataTable(dt_one);

        rep_km.DataSource = dt;
        rep_km.DataBind();
    }
Exemplo n.º 11
0
 protected void Page_Load(object sender, EventArgs e)
 {
     //获取标准币种
     bzCurrency = CommonDataBLL.GetStandard();
     huilv      = (AjaxClass.GetCurrency(Convert.ToInt32(bzCurrency), Convert.ToInt32(Session["Default_Currency"].ToString())));
     if (!this.IsPostBack)
     {
         var hkmoney = (Convert.ToDouble(Request.QueryString["hkmoney"]) * huilv).ToString();
         //HkTime.Text = (DateTime.Now).ToString();
         Money.Text = Math.Round(double.Parse(hkmoney)).ToString("#0.00");
     }
 }
Exemplo n.º 12
0
    protected void Page_Load(object sender, EventArgs e)
    {
        //获取标准币种
        bzCurrency = CommonDataBLL.GetStandard();
        huilv      = (AjaxClass.GetCurrency(Convert.ToInt32(bzCurrency), Convert.ToInt32(Session["Default_Currency"].ToString())));
        var       id     = Request.QueryString["id"];
        string    dt_one = "select * from Withdraw where  id=" + id;
        DataTable dt     = DAL.DBHelper.ExecuteDataTable(dt_one);

        Image1.ImageUrl = "../hkpzimg/" + dt.Rows[0]["hkpzImglj"].ToString();
        //rep_km.DataSource = dt;
        //rep_km.DataBind();
    }
Exemplo n.º 13
0
    protected string GetWithdrawMoney(string WithdrawMoney)
    {
        string money = "";

        if (AjaxClass.GetCurrency(Convert.ToInt32(bzCurrency), Convert.ToInt32(Session["Default_Currency"].ToString())) == 0)
        {
            money = "0.00";
        }
        else
        {
            money = (double.Parse(WithdrawMoney) * AjaxClass.GetCurrency(Convert.ToInt32(bzCurrency), Convert.ToInt32(Session["Default_Currency"].ToString()))).ToString("f2");
        }
        return(money);
    }
Exemplo n.º 14
0
    protected void Page_Load(object sender, EventArgs e)
    {
        //获取标准币种
        bzCurrency = CommonDataBLL.GetStandard();
        huilv      = (AjaxClass.GetCurrency(Convert.ToInt32(bzCurrency), Convert.ToInt32(Session["Default_Currency"].ToString())));
        var    hybh   = Session["Member"].ToString();
        var    hkid   = Request.QueryString["hkid"];
        string dt_one = "select id,hkid,Ppje,Khname,bankcard,bankname,shenHestate,WithdrawMoney,HkDj,hkpzImglj from withdraw where shenhestate in(2,11) and IsJL=1 and Khname is not  null and number='" + hybh + "' order by WithdrawTime desc";

        if (!IsPostBack)
        {
            DataTable dt = DAL.DBHelper.ExecuteDataTable(dt_one);
            rep_km.DataSource = dt;
            rep_km.DataBind();
        }
    }
Exemplo n.º 15
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Permissions.MemRedirect(Page, Permissions.redirUrl);
        //获取标准币种
        bzCurrency = CommonDataBLL.GetStandard();
        huilv      = (AjaxClass.GetCurrency(Convert.ToInt32(bzCurrency), Convert.ToInt32(Session["Default_Currency"].ToString())));
        if (!IsPostBack)
        {
            if (Session["Default_Currency"] == null)
            {
                Session["Default_Currency"] = bzCurrency;
            }

            setStoreInfo();
            search_rsj();
            Translations();
        }
    }
Exemplo n.º 16
0
    /// <summary>
    /// GridView行处理事件
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void gv_browOrder_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            e.Row.Attributes.Add("onmouseover", "bg=this.style.backgroundColor;this.style.backgroundColor='#FFFFCC'");
            e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor=bg");

            Label lblTotalMoney = e.Row.FindControl("lblTotalMoney") as Label;

            if (AjaxClass.GetCurrency(Convert.ToInt32(bzCurrency), Convert.ToInt32(Session["Default_Currency"].ToString())) == 0)
            {
                lblTotalMoney.Text = "0.00";
            }
            else
            {
                lblTotalMoney.Text = (Convert.ToDouble(lblTotalMoney.Text) * AjaxClass.GetCurrency(Convert.ToInt32(bzCurrency), Convert.ToInt32(Session["Default_Currency"].ToString()))).ToString("f2");
            }
        }
        else if (e.Row.RowType == DataControlRowType.Header)
        {
        }
    }
Exemplo n.º 17
0
    protected void gvorder_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            e.Row.Attributes.Add("onmouseover", "currentcolor=this.style.backgroundColor;this.style.backgroundColor='#FFFFCC'");
            e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor=currentcolor");
            DataRowView drv         = (DataRowView)e.Row.DataItem;
            string      defrayType  = drv["defraytype"].ToString();
            string      defrayState = drv["zhifu"].ToString();
            string      OrderID     = drv["OrderID"].ToString();
            string      expectNum   = drv["OrderExpectNum"].ToString();
            double      totalmoney  = Convert.ToDouble(drv["totalmoney"]);


            double totalcomm = 0;
            double zongMoney = totalcomm + totalmoney;

            ImageButton LinkPM        = (ImageButton)e.Row.FindControl("HyperLinkPayMent");
            ImageButton linkbtnModify = (ImageButton)e.Row.FindControl("linkbtnModify");
            ImageButton linkbtnDelete = (ImageButton)e.Row.FindControl("linkbtnDelete");

            Label lblTotalMoney = e.Row.FindControl("lblTotalMoney") as Label;

            if (AjaxClass.GetCurrency(Convert.ToInt32(bzCurrency), Convert.ToInt32(Session["Default_Currency"].ToString())) == 0)
            {
                lblTotalMoney.Text = "0.00";
            }
            else
            {
                lblTotalMoney.Text = (Convert.ToDouble(lblTotalMoney.Text) * AjaxClass.GetCurrency(Convert.ToInt32(bzCurrency), Convert.ToInt32(Session["Default_Currency"].ToString()))).ToString("f2");
            }
        }
        else if (e.Row.RowType == DataControlRowType.Header)
        {
            Transllations();
        }
    }
Exemplo n.º 18
0
 protected void givStoreInfo_RowDataBound(object sender, GridViewRowEventArgs e)
 {
     if (e.Row.RowType == DataControlRowType.DataRow)
     {
         int curr = Convert.ToInt32(DBHelper.ExecuteScalar("select rate from Currency where id=standardMoney"));
         e.Row.Attributes.Add("onmouseover", "bg=this.style.backgroundColor;this.style.backgroundColor='#FFFFCC'");
         e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor=bg");
         Label  lab = (Label)e.Row.FindControl("StoreLevelInt");
         string l   = DBHelper.ExecuteScalar("select levelstr from bsco_level where levelflag=1 and levelint = " + Convert.ToInt32(lab.Text.ToString()) + "").ToString();
         lab.Text            = l.ToString();
         e.Row.Cells[3].Text = Encryption.Encryption.GetDecipherName(e.Row.Cells[3].Text.ToString());
         e.Row.Cells[4].Text = Encryption.Encryption.GetDecipherName(e.Row.Cells[4].Text.ToString());
         e.Row.Cells[8].Text = Encryption.Encryption.GetDecipherName(e.Row.Cells[8].Text.ToString());
         if (AjaxClass.GetCurrency(curr, Convert.ToInt32(DropCurrency.SelectedValue)) == 0)
         {
             e.Row.Cells[5].Text = "0";
         }
         else
         {
             e.Row.Cells[5].Text = (Convert.ToDouble(e.Row.Cells[5].Text) * AjaxClass.GetCurrency(curr, Convert.ToInt32(DropCurrency.SelectedValue))).ToString("f2");
         }
     }
     Translations();
 }
Exemplo n.º 19
0
    /// <summary>
    /// 支付按钮事件
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void btnsure_Click(object sender, EventArgs e)
    {
        double currency = AjaxClass.GetCurrency(Convert.ToInt32(bzCurrency), Convert.ToInt32(Session["Default_Currency"].ToString()));
        int    res      = -1;
        string usemoney = lbltotalmoney.Text.Trim();
        string billid   = ViewState["billid"].ToString();
        int    roletype = Convert.ToInt32(ViewState["roletype"]);
        int    dotype   = Convert.ToInt32(ViewState["dotype"]);

        loginnumber = ViewState["loginnumber"].ToString();

        string curip = Request.UserHostAddress.ToString();

        if (!rdorempay.Checked)  //非离线支付
        {
            if (ViewState["remid"] != null)
            {
                RemittancesDAL.DelRemittancesrelationremtemp(ViewState["remid"].ToString());
            }
        }
        else //使用离线支付方式
        {
            if (ViewState["remid"] != null)
            {
                RemittancesDAL.UPRemittancesre(ViewState["remid"].ToString());
            }
        }

        if (rdoonlinepay.Checked)  //在线支付
        {
            string hkid = billid;
            ClientScript.RegisterStartupScript(GetType(), "msg", "alert('该功能正在开发中,请耐心等候!!!');", true);
            return;

            if (dotype == 1)
            {
                hkid = RemittancesDAL.AddRemittancebytypeOnline(billid, roletype, curip, loginnumber, 1);
            }
            else if (dotype == 2)
            {
                RemittancesDAL.UpdateOnlinepayway(billid, 4);
            }

            string posturl = Getposturl(hkid);

            ClientScript.RegisterStartupScript(this.GetType(), "", "<script>window.open ('" + posturl + "');</script>");
            this.btnsure.Enabled = false;
            return;
        }
        else if (rdorempay.Checked)  //离线支付
        {
            //usemoney = (double.Parse(lblrmb.Text.Trim()) * currency).ToString();
            usemoney = double.Parse(lblrmb.Text.Trim()).ToString("0.00");
            ClientScript.RegisterStartupScript(this.GetType(), "", "<script> window.location.href='payerror.aspx?ef=" + EncryKey.Encrypt("100" + "," + billid + "," + usemoney) + "';</script>");
            return;
        }
        else if (rdostorepay.Checked)  //去店铺支付
        {
            ClientScript.RegisterStartupScript(this.GetType(), "", "<script> window.location.href='payerror.aspx?ef=" + EncryKey.Encrypt("101" + "," + billid + "," + usemoney) + "';</script>");
            return;
        }
        else if (rdoectpay.Checked)                                     //会员电子货币支付
        {
            if (MemberOrderDAL.Getvalidteiscanpay(billid, loginnumber)) //限制订单必须有订货所属店铺推荐人协助人支付)
            {
                ClientScript.RegisterStartupScript(this.GetType(), "", "<script> alert('" + GetTran("007452", "该订单不属于您的协助或推荐报单,不能完成支付!") + "'); window.location.href='../Logout.aspx'; </script>");
                return;
            }
            if (ViewState["odnumber"].ToString() != loginnumber)//如果不是自己给自己支付
            {
                if (this.rdombsuregetmoney.SelectedValue == "0")
                {
                    ClientScript.RegisterStartupScript(this.GetType(), "", "<script> alert('" + GetTran("007455", "请确认已收到该会员支付的报单金额") + "');   </script>");
                    return;
                }
            }
            if (this.txtadvpass.Text == "")
            {
                ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('" + GetTran("006656", "二级密码不能为空!") + "');</script>");
                return;
            }
            string oldPass = Encryption.Encryption.GetEncryptionPwd(this.txtadvpass.Text.ToString(), loginnumber);
            int    n       = PwdModifyBLL.check(loginnumber, oldPass, 1);
            if (n <= 0)
            {
                ClientScript.RegisterStartupScript(this.GetType(), "", "<script> alert('" + GetTran("006058", "二级密码不正确!") + "'); </script>");
                return;
            }

            if (MemberInfoDAL.CheckState(Session["Member"].ToString()))
            {
                ClientScript.RegisterStartupScript(this.GetType(), "", "<script> alert('" + GetTran("007456", "会员账户已冻结,不能完成支付!") + "'); </script>");
                return;
            }


            DataTable dt_one    = DAL.DBHelper.ExecuteDataTable("select ordertype from MemberOrder where OrderID=" + billid);
            string    ordertype = dt_one.Rows[0]["ordertype"].ToString();//订单类型
            int       act;
            if (ordertype == "22" || ordertype == "12")
            {
                act = Convert.ToInt32(rdoaccounttype2.SelectedValue);
            }
            else if (ordertype == "25")
            {
                act = Convert.ToInt32(rdoaccounttype3.SelectedValue);
            }
            else
            {
                act = Convert.ToInt32(rdoaccounttype.SelectedValue);
            }

            res = AddOrderDataDAL.OrderPayment(loginnumber, billid, curip, roletype, dotype, act, loginnumber, "", 2, -1, 1, 1, "", double.Parse(usemoney), "");
            this.btnsure.Enabled = false;
        }
        else if (rdostpaymb.Checked)                                    //店铺支付 会员订单
        {
            if (MemberOrderDAL.Getvalidteiscanpay(billid, loginnumber)) //限制订单必须有订货所属店铺推荐人协助人支付)
            {
                ClientScript.RegisterStartupScript(this.GetType(), "", "<script> alert('" + GetTran("007452", "该订单不属于您的协助或推荐报单,不能完成支付!") + "'); window.location.href='../Logout.aspx'; </script>");
                return;
            }
            if (this.rdoisagree.SelectedValue == "0") //验证是否确认收到款
            {
                ClientScript.RegisterStartupScript(this.GetType(), "", "<script> alert('" + GetTran("007455", "请确认已收到该会员支付的报单金额") + "!');   </script>");
                return;
            }
            if (this.txtpayadbpass.Text == "")
            {
                ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('" + GetTran("006656", "二级密码不能为空!") + "');</script>");
                return;
            }
            string oldPass = Encryption.Encryption.GetEncryptionPwd(this.txtpayadbpass.Text.ToString(), Session["Store"].ToString());
            int    n       = PwdModifyBLL.checkstore(loginnumber, oldPass, 1);
            if (n <= 0)
            {
                ClientScript.RegisterStartupScript(this.GetType(), "", "<script> alert('" + GetTran("006058", "二级密码不正确!") + "'); </script>");
                return;
            }

            int act = Convert.ToInt32(rdostactypepaymb.SelectedValue);
            res = AddOrderDataDAL.OrderPayment(loginnumber, billid, curip, 2, 3, act, loginnumber, "", 5, -1, 1, 1, "", double.Parse(usemoney), "");
            this.btnsure.Enabled = false;
        }
        else if (rdostopayorder.Checked)  //店铺电子账户支付 订货单
        {
            if (this.txtstadvpass.Text == "")
            {
                ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('" + GetTran("006656", "二级密码不能为空!") + "');</script>");
                return;
            }
            string oldPass = Encryption.Encryption.GetEncryptionPwd(this.txtstadvpass.Text.ToString(), Session["Store"].ToString());
            int    n       = PwdModifyBLL.checkstore(loginnumber, oldPass, 1);
            if (n <= 0)
            {
                ClientScript.RegisterStartupScript(this.GetType(), "", "<script> alert('" + GetTran("006058", "二级密码不正确!") + "'); </script>");

                return;
            }
            int act = Convert.ToInt32(rdostaccount.SelectedValue);

            res = AddOrderDataDAL.OrderPayment(loginnumber, billid, curip, roletype, dotype, act, loginnumber, "", 2, -1, 1, 1, "", double.Parse(usemoney), ""); this.btnsure.Enabled = false;
        }
        else
        {
            ClientScript.RegisterStartupScript(this.GetType(), "", "<script> alert('" + GetTran("000000", "请至少选择一种支付方式!") + "'); </script>");
            return;
        }

        PublicClass.SendMsg(1, billid, "");

        ClientScript.RegisterStartupScript(this.GetType(), "", "<script> window.location.href='payerror.aspx?ef=" + EncryKey.Encrypt(res.ToString() + "," + billid + "," + usemoney) + "';</script>");
        return;
    }
Exemplo n.º 20
0
    public void LoadData1()
    {
        double currency = AjaxClass.GetCurrency(int.Parse(Session["Default_Currency"] == null ? bzCurrency.ToString() : Session["Default_Currency"].ToString()));
        string billid   = ViewState["billid"].ToString();
        int    dotype   = Convert.ToInt32(ViewState["dotype"]);
        int    roletype = Convert.ToInt32(ViewState["roletype"]);

        this.lblorderid.Text = billid;


        MemberOrderModel memberorder     = null;
        DataTable        ordergoodstable = null;
        DataTable        dtcb            = null; //查询会员汇入银行
        string           paymentnumber   = "";   //被支付订单(汇款单)所属会员编号
        double           totalmoney      = 0;    // 被支付订单(汇款单)总金额

        if (dotype == 1)                         //订单支付
        {
            lbltype.Text = GetTran("000907", "订单支付");
            lblot.Text   = GetTran("000079", "订单号");
        }
        else if (dotype == 2)//充值
        {
            div_1.Style.Add("display", "none");
            div_2.Style.Add("display", "none");

            div_5.Style.Add("display", "none");
            div_6.Style.Add("display", "none");
            lbltype.Text       = GetTran("007451", "订单支付");
            lblot.Text         = GetTran("005854", "汇款单号");
            ViewState["remid"] = billid;

            RemittancesModel remittance = RemittancesDAL.GetRemitByHuidan(billid);
            paymentnumber = remittance.RemitNumber.ToString();                  //被支付订单(汇款单)所属会员编号
            totalmoney    = Convert.ToDouble(remittance.RemitMoney) * currency; // 被支付订单(汇款单)总金额
        }


        if (roletype == 1)  //会员
        {
            //隐藏店铺操作
            div_6.Style.Add("display", "none");
            div_5.Style.Add("display", "none");

            if (Session["Member"] != null)
            {
                loginnumber = Session["Member"].ToString();
            }
            else if (Session["Store"] != null)
            {
                loginnumber = Session["Store"].ToString();
                //店铺支付会员订单
                div_1.Style.Add("display", "none");
                div_2.Style.Add("display", "none");
                div_3.Style.Add("display", "none");
                div_4.Style.Add("display", "none");
                div_6.Style.Add("display", "none");
                div_5.Style.Add("display", "");
            }


            if (dotype == 1)                                                //订单支付
            {
                if (MemberOrderDAL.Getvalidteiscanpay(billid, loginnumber)) //限制订单必须有订货所属店铺中心支付)
                {
                    ClientScript.RegisterStartupScript(this.GetType(), "", "<script> alert('" + GetTran("007452", "该订单不属于您的协助或推荐报单,不能完成支付") + "'); window.location.href='../Logout.aspx'; </script>");

                    return;
                }
                memberorder = MemberOrderDAL.GetMemberOrder(billid);
                if (loginnumber == "")
                {
                    loginnumber = memberorder.Number;
                }
                else
                {
                    ViewState["odnumber"] = memberorder.Number;
                }
                if (memberorder.Number == loginnumber)//如果是自己支付自己的订单则不需要确认收到款
                {
                    div_sure.Visible = false; rdombsuregetmoney.Visible = false;
                }
                if (memberorder == null)
                {
                    ClientScript.RegisterStartupScript(this.GetType(), "", "<script> window.location.href='payerror.aspx?ef=" + EncryKey.Encrypt("1").ToLower() + "';</script>");
                    return;
                }
                if (memberorder.DefrayState == 1)
                {
                    ClientScript.RegisterStartupScript(this.GetType(), "", "<script>window.location.href='payerror.aspx?ef=" + EncryKey.Encrypt("2").ToLower() + "';</script>");
                    return;
                }
                paymentnumber = memberorder.Number.ToString();            //被支付订单(汇款单)所属会员编号
                totalmoney    = Convert.ToDouble(memberorder.TotalMoney); // 被支付订单(汇款单)总金额
            }
            dtcb = CompanyBankDAL.getdtcompanybankbynumber(loginnumber, 1);
        }
        else if (roletype == 2)  //店铺
        {
            //隐藏店铺操作
            div_2.Style.Add("display", "none");
            div_1.Style.Add("display", "none");
            div_5.Style.Add("display", "none");
            loginnumber = Session["Store"].ToString();
            dtcb        = CompanyBankDAL.getdtcompanybankbynumber(loginnumber, 2);
            if (dotype == 1)  //订单操作
            {
                ordergoodstable = OrderDetailDAL.Getordergoodstablebyorderid(billid);
                if (ordergoodstable != null && ordergoodstable.Rows.Count > 0)
                {
                    if (ordergoodstable.Rows[0]["IsCheckOut"].ToString() == "Y")
                    {
                        ClientScript.RegisterStartupScript(this.GetType(), "", "<script>window.location.href='payerror.aspx?ef=" + EncryKey.Encrypt("2").ToLower() + "';</script>");
                        return;
                    }
                }
                else
                {
                    ClientScript.RegisterStartupScript(this.GetType(), "", "<script> window.location.href='payerror.aspx?ef=" + EncryKey.Encrypt("1").ToLower() + "';</script>");
                    return;
                }
                //paymentnumber = ordergoodstable.Rows[0]["storeid"].ToString();//被支付订单(汇款单)所属会员编号
                totalmoney = Convert.ToDouble(ordergoodstable.Rows[0]["totalmoney"]);// 被支付订单(汇款单)总金额
            }
        }
        lblstoreid1.Text    = loginnumber;
        lblstoreID2.Text    = loginnumber;
        lblordernumber.Text = loginnumber;
        lbltotalmoney.Text  = totalmoney.ToString("0.00");
        lblordertmoney.Text = totalmoney.ToString("0.00");
        ViewState["tm"]     = totalmoney;
        string cardstr = "";
        int    i       = 1;

        if (dtcb != null && dtcb.Rows.Count > 0)
        {
            foreach (DataRow item in dtcb.Rows)
            {
                cardstr += " <div   id='bank" + i.ToString() + "'    >&nbsp;&nbsp;&nbsp;&nbsp;" + GetTran("001243", "开户行") + ":&nbsp;&nbsp;&nbsp;&nbsp;" + item["Bank"].ToString() + "<br/>&nbsp;&nbsp;&nbsp;&nbsp;" + GetTran("007506", "账") + "&nbsp;&nbsp;&nbsp;" + GetTran("007453", "号") + ":&nbsp;&nbsp;&nbsp;" + getsplit(item["BankBook"].ToString()) + "<br/>&nbsp;&nbsp;&nbsp;&nbsp;" + GetTran("000086", "开户名") + ":&nbsp;&nbsp;&nbsp;&nbsp;" + item["Bankname"].ToString() + "</div>"; i++;
            }
            this.cardlist.InnerHtml = cardstr;//绑定银行信息
        }
    }
Exemplo n.º 21
0
    /// <summary>
    /// 获取标示码
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void Loadmk()
    {
        string           billid           = ViewState["billid"].ToString();
        int              dotype           = Convert.ToInt32(ViewState["dotype"]);
        int              roletype         = Convert.ToInt32(ViewState["roletype"]);
        double           currency         = AjaxClass.GetCurrency(int.Parse(Session["Default_Currency"] == null ? bzCurrency.ToString() : Session["Default_Currency"].ToString()));
        string           ip               = Request.UserHostAddress.ToString();
        string           remark           = "";
        MemberOrderModel memberorder      = null;
        DataTable        ordergoodstable  = null;
        DataTable        ordergoodstable1 = null;
        double           ordertmoney      = 0;

        if (roletype == 1)  //会员订单
        {
            if (dotype == 1)
            {
                memberorder = MemberOrderDAL.GetMemberOrder(billid);
                ordertmoney = Convert.ToDouble(memberorder.TotalMoney);
            }
        }
        else
        if (roletype == 2)      //店铺
        {
            if (dotype == 1)
            {
                ordergoodstable  = OrderDetailDAL.Getordergoodstablebyorderid1(billid);
                ordergoodstable1 = OrderDetailDAL.Getordergoodstablebyorderid2(billid);
                if (ordergoodstable != null && ordergoodstable.Rows.Count > 0)
                {
                    ordertmoney = Convert.ToDouble(ordergoodstable.Rows[0]["totalmoney"]);
                }

                else
                {
                    if (ordergoodstable1 != null && ordergoodstable1.Rows.Count > 0)
                    {
                        ordertmoney = Convert.ToDouble(ordergoodstable1.Rows[0]["totalmoney"]);
                    }
                }
            }
        }
        string biaoshi = "";

        if (dotype == 1)  //订单支付生成尾数
        {
            remark = loginnumber + "汇款支付订单" + billid;
            int c = 1; //数据库中1代表会员 0代表店铺
            if (roletype == 2)
            {
                c = 0;
            }
            string rmid = RemittancesDAL.GetAddnewRemattice(loginnumber, ordertmoney, ip, billid, remark, c);
            ViewState["remid"] = rmid;
            DataTable dt = DBHelper.ExecuteDataTable("select totalrmbmoney ,totalmoney from  remtemp where remittancesid='" + rmid + "'");

            if (dt != null && dt.Rows.Count > 0)
            {
                //    biaoshi = Convert.ToDouble(dt.Rows[0]["totalrmbmoney"]).ToString("f2");
                biaoshi = Convert.ToDouble(dt.Rows[0]["totalmoney"]).ToString("#0.00");
            }
        }
        else
        if (dotype == 2)     //汇款充值生成尾数
        {
            RemittancesDAL.GetAddnewRetmp(loginnumber, billid, ip, remark, roletype);
            DataTable dt = DBHelper.ExecuteDataTable("select totalrmbmoney ,totalmoney from  remtemp where remittancesid='" + billid + "'");      //查找出标识

            if (dt != null && dt.Rows.Count > 0)
            {
                //biaoshi = Convert.ToDouble(dt.Rows[0]["totalrmbmoney"]).ToString("f2");
                biaoshi = Convert.ToDouble(dt.Rows[0]["totalmoney"]).ToString("#0.00");
            }
        }
        if (biaoshi != "" && biaoshi.ToString().IndexOf('.') > 0)
        {
            DataTable dt = new DataTable();
            if (dotype == 1)
            {
                remark = loginnumber + "汇款支付订单" + billid;
                int c = 1; //数据库中1代表会员 0代表店铺
                if (roletype == 2)
                {
                    c = 0;
                }
                string rmid = RemittancesDAL.GetAddnewRemattice(loginnumber, ordertmoney, ip, billid, remark, c);
                ViewState["remid"] = rmid;
                dt = DBHelper.ExecuteDataTable("select totalrmbmoney ,totalmoney from  remtemp where remittancesid='" + rmid + "'");
            }
            else if (dotype == 2)
            {
                RemittancesDAL.GetAddnewRetmp(loginnumber, billid, ip, remark, roletype);
                dt = DBHelper.ExecuteDataTable("select totalrmbmoney ,totalmoney from  remtemp where remittancesid='" + billid + "'");  //查找出标识
            }

            string bb = (double.Parse(biaoshi) * currency).ToString();
            //lblpartmoney.Text = (bb).Substring(0, (bb).IndexOf('.'));
            //string chart = bb.Substring(bb.IndexOf('.') + 1);
            this.lblmoneyre.Text = (double.Parse(bb)).ToString();
            this.lblrmb.Text     = double.Parse(lbltotalmoney.Text).ToString("#0.00");
            //lblchat.Text = (double.Parse(chart) ).ToString(); ;
            //lbljiao.Text = chart.Substring(0, 1);
            //lblfen.Text = chart.Substring(1);
        }
    }
Exemplo n.º 22
0
    /*-------------------------------------------------------------------------------------------------------------------------------------------------------*/
    public void readBonus(int expectnum)
    {
        int maxqs = BLL.CommonClass.CommonDataBLL.GetMaxqishu();
        // int maxExpectNum = DetialQueryBLL.IsSuanceJj(expectnum);  //最大公布期数
        double curreny = AjaxClass.GetCurrency(Convert.ToInt32(bzCurrency), Convert.ToInt32(Session["Default_Currency"].ToString()));

        if (expectnum == 0)
        {
            expectnum = 1;
        }
        DataTable dt = MemberInfoModifyBll.getBonusTable(expectnum, Session["Member"].ToString());//第一个参数期数

        DataTable dt_one   = DAL.DBHelper.ExecuteDataTable("select IsSuance from config where ExpectNum=" + expectnum);
        string    IsSuance = dt_one.Rows[0]["IsSuance"].ToString();//是否显示

        if (dt.Rows.Count > 0)
        {
            if (curreny == 0)
            {
            }
            else
            {
                if (IsSuance == "0")
                {
                    //this.Label1.Text = "0.00";
                    //this.Label2.Text = "0.00";
                    //this.Label3.Text = "0.00";
                    //this.Label4.Text = "0.00";
                    //this.Label5.Text = "0.00";
                    //this.Label6.Text = "0.00";
                    //this.Label7.Text = "0.00";
                    //this.Label8.Text = "0.00";
                    //this.Label9.Text = "0.00";
                    //this.Label10.Text = "0.00";
                    //lbllbonus6.Text = "0.00";
                }
                else
                {
                    //this.Label1.Text = (Convert.ToDouble(dt.Rows[0]["Bonus0"]) / AjaxClass.GetCurrency(Convert.ToInt32(bzCurrency), Convert.ToInt32(Session["Default_Currency"].ToString()))).ToString("0.00");
                    //this.Label1.Text = (Convert.ToDouble(dt.Rows[0]["Bonus1"]) *
                    //AjaxClass.GetCurrency(Convert.ToInt32(bzCurrency), Convert.ToInt32(Session["Default_Currency"].ToString()))).ToString("0.00");
                    //this.Label2.Text = (Convert.ToDouble(dt.Rows[0]["Bonus2"]) * curreny).ToString("0.00");
                    //this.Label3.Text = (Convert.ToDouble(dt.Rows[0]["Bonus3"]) * curreny).ToString("0.00");
                    //this.Label4.Text = (Convert.ToDouble(dt.Rows[0]["Bonus4"]) * curreny).ToString("0.00");
                    //this.Label5.Text = (Convert.ToDouble(dt.Rows[0]["Bonus5"]) * curreny).ToString("0.00");
                    //lbllbonus6.Text = (Convert.ToDouble(dt.Rows[0]["Bonus6"]) * curreny).ToString("0.00");
                    //this.Label6.Text = (Convert.ToDouble(dt.Rows[0]["Kougl"]) * curreny).ToString("0.00");
                    //this.Label7.Text = (Convert.ToDouble(dt.Rows[0]["Koufl"]) * curreny).ToString("0.00");
                    //this.Label8.Text = (Convert.ToDouble(dt.Rows[0]["Koufx"]) * curreny).ToString("0.00");
                    //this.Label9.Text = (Convert.ToDouble(dt.Rows[0]["CurrentSolidSend"]) * curreny).ToString("0.00");
                    //this.Label10.Text = (Convert.ToDouble(dt.Rows[0]["CurrentTotalMoney"]) * curreny).ToString("0.00");
                }
            }
        }
        else
        {
            //this.Label1.Text = "0.00";
            //this.Label1.Text = "0.00";
            //this.Label2.Text = "0.00";
            //this.Label3.Text = "0.00";
            //this.Label4.Text = "0.00";
            //this.Label5.Text = "0.00";
            //this.Label6.Text = "0.00";
            //this.Label7.Text = "0.00";
            //this.Label8.Text = "0.00";
            //this.Label9.Text = "0.00";
            //this.Label10.Text = "0.00";
        }
    }
Exemplo n.º 23
0
    //绑定信息
    public void readInfo()
    {
        MemberInfoModel memberInfoModel = MemberInfoModifyBll.getMemberInfo(Number);

        #region 读取个人信息
        if (memberInfoModel != null)
        {
            this.storeid.Text = memberInfoModel.StoreID;
        }

        #endregion

        DataTable dt = DetialQueryBLL.GetMemberInfoBalanceByNumber(ExpectNum, Number);
        if (dt.Rows.Count > 0)
        {
            CurrentTotalNetRecord.Text = (Convert.ToDouble(dt.Rows[0]["CurrentTotalNetRecord"]) / AjaxClass.GetCurrency(Convert.ToInt32(bzCurrency), Convert.ToInt32(Session["Default_Currency"].ToString()))).ToString("0.00");
            CurrentOneMark.Text        = (Convert.ToDouble(dt.Rows[0]["CurrentOneMark"]) / AjaxClass.GetCurrency(Convert.ToInt32(bzCurrency), Convert.ToInt32(Session["Default_Currency"].ToString()))).ToString("0.00");
            level.Text = dt.Rows[0]["levelstr"].ToString();
            if (dt.Rows[0]["TotalNetNum"] == null || dt.Rows[0]["TotalNetNum"].ToString() == "")
            {
                labTotalNetNum.Text = "0";;
            }
            else
            {
                labTotalNetNum.Text = (Convert.ToDouble(dt.Rows[0]["TotalNetNum"]) / AjaxClass.GetCurrency(Convert.ToInt32(bzCurrency), Convert.ToInt32(Session["Default_Currency"].ToString()))).ToString("0.00");
            }
            labDTotalNetNum.Text = (Convert.ToDouble(dt.Rows[0]["DTotalNetNum"]) / AjaxClass.GetCurrency(Convert.ToInt32(bzCurrency), Convert.ToInt32(Session["Default_Currency"].ToString()))).ToString("0.00");

            //个人总资格业绩
            if (dt.Rows[0]["TotalOneMark"] == null || dt.Rows[0]["TotalOneMark"].ToString() == "")
            {
                labCurrentOneMark1.Text = "0.00";
            }
            else
            {
                labCurrentOneMark1.Text = (Convert.ToDouble(dt.Rows[0]["TotalOneMark"].ToString()) / AjaxClass.GetCurrency(Convert.ToInt32(bzCurrency), Convert.ToInt32(Session["Default_Currency"].ToString()))).ToString("0.00");
            }

            labCurrentTotalNetRecord.Text = (Convert.ToDouble(dt.Rows[0]["CurrentTotalNetRecord"].ToString()) / AjaxClass.GetCurrency(Convert.ToInt32(bzCurrency), Convert.ToInt32(Session["Default_Currency"].ToString()))).ToString("0.00");

            if (dt.Rows[0]["TotalNetRecord"] == null || dt.Rows[0]["TotalNetRecord"].ToString() == "")
            {
                labTotalNetRecord1.Text = "0.00";
            }
            else
            {
                labTotalNetRecord1.Text = (Convert.ToDouble(dt.Rows[0]["TotalNetRecord"].ToString()) / AjaxClass.GetCurrency(Convert.ToInt32(bzCurrency), Convert.ToInt32(Session["Default_Currency"].ToString()))).ToString("0.00");
            }

            labdCurrentTotalNetRecord2.Text = Convert.ToDouble(dt.Rows[0]["dCurrentTotalNetRecord"].ToString()).ToString("0.00");
            labdTotalNetRecord2.Text        = (Convert.ToDouble(dt.Rows[0]["dTotalNetRecord"].ToString()) / AjaxClass.GetCurrency(Convert.ToInt32(bzCurrency), Convert.ToInt32(Session["Default_Currency"].ToString()))).ToString("0.00");

            CurrentNewNetNum.Text = (Convert.ToDouble(dt.Rows[0]["DCurrentNewNetNum"].ToString()) / AjaxClass.GetCurrency(Convert.ToInt32(bzCurrency), Convert.ToInt32(Session["Default_Currency"].ToString()))).ToString("0.00");
        }
        else
        {
            CurrentTotalNetRecord.Text = "0.00";
            CurrentOneMark.Text        = "0.00";
            level.Text            = " ";
            CurrentNewNetNum.Text = "0";
        }
    }
Exemplo n.º 24
0
    protected void gvRefundmentBrowse_RowDataBound1(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            e.Row.Attributes.Add("onmouseover", "bg=this.style.backgroundColor;this.style.backgroundColor='#FFFFCC'");
            e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor=bg");

            Label lblTotalMoney = e.Row.FindControl("Label2") as Label;

            if (AjaxClass.GetCurrency(Convert.ToInt32(bzCurrency), Convert.ToInt32(Session["Default_Currency"].ToString())) == 0)
            {
                lblTotalMoney.Text = "0.00";
            }
            else
            {
                lblTotalMoney.Text = (Convert.ToDouble(lblTotalMoney.Text) * AjaxClass.GetCurrency(Convert.ToInt32(bzCurrency), Convert.ToInt32(Session["Default_Currency"].ToString()))).ToString("f2");
            }

            Label      lbl_StatusFlag_NR = (Label)e.Row.FindControl("lbl_StatusFlag_NR");
            LinkButton lbtn_Audit        = (LinkButton)e.Row.FindControl("lbtn_Audit");
            LinkButton lbtn_lock         = (LinkButton)e.Row.FindControl("lbtn_lock");
            LinkButton lbtn_unlock       = (LinkButton)e.Row.FindControl("lbtn_unlock");
            LinkButton lbl_Del           = (LinkButton)e.Row.FindControl("lbl_Del");
            Label      lbl_IsLock        = (Label)e.Row.FindControl("lbl_IsLock");
            int        StatusFlag_NR     = int.Parse(lbl_StatusFlag_NR.Text);
            int        IsLock            = int.Parse(lbl_IsLock.Text);
            if (LoginIDEntity == 0)
            {
                if (lbl_StatusFlag_NR != null)
                {
                    switch (StatusFlag_NR)
                    {
                    case (int)RefundmentOrderStatusEnum.UnAudit:
                        if (IsLock == 0)
                        {
                            lbtn_Audit.Visible = true;
                            lbl_Del.Visible    = true;
                            //lbtn_lock.Visible = true;
                            //lbtn_unlock.Visible = false;
                        }
                        else
                        {
                            lbtn_Audit.Visible = false;
                            lbl_Del.Visible    = false;
                            //lbtn_unlock.Visible = true;
                            //lbtn_lock.Visible = false;
                        }
                        break;

                    case (int)RefundmentOrderStatusEnum.AuditedUnPay:
                        //lbtn_unlock.Visible = false;
                        //lbtn_lock.Visible = false;
                        lbtn_Audit.Visible = false;
                        lbl_Del.Visible    = false;
                        break;

                    case (int)RefundmentOrderStatusEnum.Audited:
                        //lbtn_unlock.Visible = false;
                        //lbtn_lock.Visible = false;
                        lbtn_Audit.Visible = false;
                        lbl_Del.Visible    = false;
                        break;
                    }
                    if (IsLock == 0)
                    {
                        if (StatusFlag_NR == (int)RefundmentOrderStatusEnum.UnAudit)
                        {
                            lbtn_lock.Visible = true;
                        }
                        else
                        {
                            lbtn_lock.Visible   = false;
                            lbtn_unlock.Visible = false;
                        }
                    }
                    else
                    {
                        lbtn_Audit.Visible  = false;
                        lbl_Del.Visible     = false;
                        lbtn_unlock.Visible = true;
                        lbtn_lock.Visible   = false;
                    }
                }
            }
            else
            {
                lbtn_Audit.Visible  = false;
                lbtn_lock.Visible   = false;
                lbtn_unlock.Visible = false;
                switch (StatusFlag_NR)
                {
                case (int)RefundmentOrderStatusEnum.UnAudit:
                    if (IsLock == 0)
                    {
                        lbl_Del.Visible = true;
                    }
                    else
                    {
                        lbl_Del.Visible = false;
                    }
                    break;

                case (int)RefundmentOrderStatusEnum.AuditedUnPay:
                    lbl_Del.Visible = false;
                    break;

                case (int)RefundmentOrderStatusEnum.Audited:
                    lbl_Del.Visible = false;
                    break;
                }
            }
            // (e.Row.FindControl("ltAuditing") as Literal).Text = "<a href='#' onclick='ShowTbInfo(\"" + docId + "\",'',\"" + totalMoney + "\",\"" + totalPv + "\",\"" + date + "\")' >" + GetTran("000761", "审核") + "</a>";
        }
        else if (e.Row.RowType == DataControlRowType.Header)
        {
            e.Row.Attributes.Add("style", "background-image:url('../images/tabledp.gif')");
            Translations();
        }
    }
Exemplo n.º 25
0
    protected void Page_Load(object sender, EventArgs e)
    {
        //获取标准币种
        bzCurrency = CommonDataBLL.GetStandard();
        i          = (AjaxClass.GetCurrency(Convert.ToInt32(bzCurrency), Convert.ToInt32(Session["Default_Currency"].ToString())));
        Permissions.ThreeRedirect(Page, "../member/" + Permissions.redirUrl);
        luo.SetVlaue();
        AjaxPro.Utility.RegisterTypeForAjax(typeof(AjaxMemShopCart));
        AjaxPro.Utility.RegisterTypeForAjax(typeof(AjaxClass));

        Translations();

        if (!IsPostBack)
        {
            BindRadioType();

            if (Session["mbreginfo"] != null)
            {
                mim = (MemberInfoModel)Session["mbreginfo"];
            }
            if (Session["UserType"] != null && Session["UserType"].ToString() != "3" && Session["EditOrderID"] == null)
            {
                top.Visible          = false;
                bottom.Visible       = false;
                STop1.Visible        = false;
                SLeft1.Visible       = false;
                txtMemBh.Visible     = true;
                lblMemBh.Style.Value = "display:none;";
            }
            else
            {
                if (Session["UserType"].ToString() == "2")
                {
                    top.Visible    = false;
                    bottom.Visible = false;
                    STop1.Visible  = true;
                    SLeft1.Visible = true;
                }
                else
                {
                    top.Visible    = false;
                    bottom.Visible = false;
                    STop1.Visible  = false;
                    SLeft1.Visible = false;
                }

                txtMemBh.Style.Value = "display:none;";
                lblMemBh.Style.Value = "display:block;";

                txtMemBh.Text = luo.MemBh;
                lblMemBh.Text = luo.MemBh;
            }

            BindData();

            //不是注册过来的新会员
            if (Session["mbreginfo"] == null)
            {
                if ((Session["UserType"] != null && Session["UserType"].ToString() == "3") || Session["EditOrderID"] != null)
                {
                    top.Visible    = true;
                    bottom.Visible = true;
                    STop1.Visible  = false;
                    SLeft1.Visible = false;


                    Txtyddh.Visible = false;
                    txtName.Visible = false;

                    //不是注册过来的,就进行名称和邮编的查询
                    DataTable dt = DAL.DBHelper.ExecuteDataTable("select name,postalcode,mobiletele,cpccode,address,storeid from memberinfo where number='" + luo.MemBh + "'");
                    if (dt != null && dt.Rows.Count > 0)
                    {
                        this.txtName.Text = Encryption.Encryption.GetDecipherName(dt.Rows[0]["Name"].ToString());
                        this.labName.Text = Encryption.Encryption.GetDecipherName(dt.Rows[0]["Name"].ToString());
                        if (dt.Rows[0]["postalcode"].ToString() != "")
                        {
                            this.txtPostCode.Text = dt.Rows[0]["postalcode"].ToString();
                            this.labPostCode.Text = dt.Rows[0]["postalcode"].ToString();
                        }
                        else
                        {
                            this.txtPostCode.Text = "111111";
                            this.labPostCode.Text = "111111";
                        }
                        this.Txtyddh.Text = dt.Rows[0]["mobiletele"].ToString();
                        this.labyddh.Text = dt.Rows[0]["mobiletele"].ToString();
                    }
                    GetBindAddress();
                }
                else
                {
                    if (Session["UserType"].ToString() == "2")
                    {
                        top.Visible    = false;
                        bottom.Visible = false;
                        STop1.Visible  = true;
                        SLeft1.Visible = true;
                    }
                    else
                    {
                        top.Visible    = true;
                        bottom.Visible = true;
                        STop1.Visible  = false;
                        SLeft1.Visible = false;
                    }


                    this.rbtAddress.Items.Add(GetTran("000200", "新地址"));

                    this.rbtAddress.SelectedIndex = 0;
                    txtName.Enabled = false;
                    Txtyddh.Enabled = false;
                }
            }
            else
            {
                if (Session["UserType"] != null && Session["UserType"].ToString() != "3" && Session["EditOrderID"] == null)
                {
                    top.Visible          = false;
                    bottom.Visible       = false;
                    STop1.Visible        = false;
                    SLeft1.Visible       = false;
                    txtMemBh.Visible     = true;
                    lblMemBh.Style.Value = "display:none;";
                }
                else
                {
                    if (Session["UserType"].ToString() == "2")
                    {
                        top.Visible    = false;
                        bottom.Visible = false;
                        STop1.Visible  = true;
                        SLeft1.Visible = true;
                    }
                    else
                    {
                        top.Visible    = false;
                        bottom.Visible = false;
                        STop1.Visible  = false;
                        SLeft1.Visible = false;
                    }
                }
                //邮编和姓名默认赋值进去
                MemberInfoModel mi = (MemberInfoModel)Session["mbreginfo"];
                mim = mi;

                txtMemBh.Style.Value = "display:none;";
                lblMemBh.Style.Value = "display:block;";
                txtMemBh.Text        = mi.Number;
                lblMemBh.Text        = mi.Number;

                this.txtName.Text     = Encryption.Encryption.GetDecipherName(mi.Name);
                this.labName.Text     = Encryption.Encryption.GetDecipherName(mi.Name);
                this.txtPostCode.Text = mi.PostalCode;
                this.labPostCode.Text = mi.PostalCode;
                if (mi.PostalCode.Length == 0)
                {
                    this.labPostCode.Text = "111111";
                    this.txtPostCode.Text = "111111";
                }
                this.Txtyddh.Text = mi.MobileTele;
                this.labyddh.Text = mi.MobileTele;

                txtConName.Text    = Encryption.Encryption.GetDecipherName(mi.Name);
                txtOtherPhone.Text = mi.MobileTele;
                this.txtName.Attributes.Add("style", "display:none;");
                this.txtPostCode.Attributes.Add("style", "display:none;");
                this.Txtyddh.Attributes.Add("style", "display:none;");
                if (mi.CPCCode.Trim().Length > 0)
                {
                    CountryCity2.SetCityCode(mi.CPCCode);//将注册的地址设置为默认的
                }
                Txtdz.Text = mi.Address;
                GetBindAddress();
            }
            p_content2.Style.Add("display", "none");
        }
    }
Exemplo n.º 26
0
    public void getTotalMoney(string number)
    {
        Label1.Text = "<b>" + GetTran("007591", "已支付付款金额") + "</b>" + ":<span style=\"color:red\">" +
                      (Convert.ToDouble(RemittancesBLL.GetTotalMoney("RemitMoney", " Remittances a left join Withdraw c on a.ID=c.hkid ", " where isgsqr=1 and isnull(c.shenhestate,-1)<>-1 and RemitStatus=1 and relationorderid='' and RemitNumber='" + number + "'")) * (AjaxClass.GetCurrency(Convert.ToInt32(bzCurrency), Convert.ToInt32(Session["Default_Currency"].ToString())))
                      ).ToString("f2")

                      + "</span>";
        Label2.Text = "<b>" + GetTran("007592", "未支付付款金额") + "</b>" + ":<span style=\"color:red\">" +
                      (Convert.ToDouble(RemittancesBLL.GetTotalMoney("RemitMoney", " Remittances a left join Withdraw c on a.ID=c.hkid ", " where isgsqr=0 and isnull(c.shenhestate,-1)<>-1 and RemitStatus=1 and relationorderid='' and RemitNumber='" + number + "'")) / (AjaxClass.GetCurrency(Convert.ToInt32(bzCurrency), Convert.ToInt32(Session["Default_Currency"].ToString())))
                      ).ToString("f2")

                      + "</span>";
    }
Exemplo n.º 27
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["Store"] != null)
        {
            Literal1.Text = "<a href='../Store/First.aspx'>我的首页</a><a href='../Store/auditingmemberorders.aspx'>注册确认</a><a href='../Store/auditingmemberagain.aspx'>复消确认</a><a href='../Store/CheckOutOrders.aspx'>订单支付</a><a href='../Store/ViewAccountCircs.aspx'>充值浏览</a><a href='../Logout.aspx'>退出系统</a>";
        }
        if (Session["Member"] != null)
        {
            Literal1.Text = "<a href='../Member/First.aspx'>我的首页</a><a href='../Member/AuditingMemberOrder.aspx'>报单支付</a><a href='../Member/ResultBrowse.aspx'>充值浏览</a><a href='../Logout.aspx'>退出系统</a>";
        }

        //获取标准币种
        bzCurrency = CommonDataBLL.GetStandard();
        if (!IsPostBack)
        {
            double currency = AjaxClass.GetCurrency(Convert.ToInt32(bzCurrency), Convert.ToInt32(Session["Default_Currency"].ToString()));
            if (Request.QueryString["ef"] != null)
            {
                string   ef    = EncryKey.Decrypt(Request.QueryString["ef"].ToUpper()).ToString();
                string   typ   = "";
                double   money = 0;
                string   bill  = "";
                string[] sf    = ef.Split(',');
                if (sf.Length >= 3)
                {
                    typ   = sf[0].ToString();
                    bill  = sf[1].ToString();
                    money = Convert.ToDouble(sf[2]);
                }
                else
                {
                    typ = ef;
                }
                string showinfo = "";

                switch (typ)
                {
                case "0":
                    //showinfo = GetTran("007512", "成功支付订单") + bill + " ," + GetTran("000789", "支付金额") + ":" + double.Parse(money.ToString("0.00")) / currency + GetTran("000564", "元");
                    showinfo = GetTran("007512", "成功支付订单") + bill + " ," + GetTran("000789", "支付金额") + ":" + double.Parse(money.ToString("0.00")) + GetTran("000564", "元");
                    break;

                case "1":
                    showinfo = GetTran("007513", "支付失败,订单已支付或订单号不存在");
                    break;

                case "2":
                    showinfo = GetTran("007514", "支付失败,账户可用余额不足");
                    break;

                case "3":
                    showinfo = GetTran("007515", "支付失败,账户类型不存在");
                    break;

                case "4":
                    showinfo = GetTran("007370", "未到账");
                    break;

                case "5":
                    showinfo = GetTran("007516", "支付失败,服务机构周转款不足");
                    break;

                case "6":
                    showinfo = GetTran("007517", "支付失败,服务机构订货款不足");
                    break;

                case "100":
                    //showinfo = GetTran("007518", "请您务必在 24 小时内完成向指定账户汇款") + double.Parse(money.ToString("0.00")) / currency + GetTran("000564", "元") + "," + GetTran("007519", "否则将视为您自动放弃汇款");
                    showinfo = GetTran("007518", "请您务必在 24 小时内完成向指定账户汇款") + double.Parse(money.ToString("0.00")) + GetTran("000564", "元") + "," + GetTran("007519", "否则将视为您自动放弃汇款");
                    break;

                case "101":
                    //showinfo = GetTran("007520", "请将") + bill + GetTran("007521", "订单款额") + double.Parse(money.ToString("0.00")) / currency + GetTran("000564", "元") + GetTran("007522", "交给您的购货店铺,并要求其为您支付订单");
                    showinfo = GetTran("007520", "请将") + bill + GetTran("007521", "订单款额") + double.Parse(money.ToString("0.00")) + GetTran("000564", "元") + GetTran("007522", "交给您的购货店铺,并要求其为您支付订单");
                    break;

                default:
                    showinfo = GetTran("007523", "未知错误");
                    break;
                }

                lblinfo.Text = showinfo;
            }
        }
    }
Exemplo n.º 28
0
    protected void Page_Load(object sender, EventArgs e)
    {
        //获取标准币种
        bzCurrency = CommonDataBLL.GetStandard();
        huilv      = (AjaxClass.GetCurrency(Convert.ToInt32(bzCurrency), Convert.ToInt32(Session["Default_Currency"].ToString())));
        Permissions.ThreeRedirect(Page, "../Member/" + Permissions.redirUrl);

        //AjaxPro.Utility.RegisterTypeForAjax(typeof(AjaxMemShopCart));

        if (!IsPostBack)
        {
            Translations();
            lbltype.Text = GetTran("007286", "报单支付");
            lblot.Text   = GetTran("000079", "订单号");
            if (Request.QueryString["blif"] != null && Request.QueryString["blif"] != "")
            {
                string   blif = Request.QueryString["blif"].ToString();
                string[] strs = EncryKey.GetDecrypt(blif);
                if (strs.Length >= 3)
                {
                    ViewState["billid"] = strs[0];


                    ViewState["dotype"]   = strs[1];
                    ViewState["roletype"] = strs[2];
                    if (ViewState["billid"] != null && ViewState["dotype"] != null && ViewState["roletype"] != null)
                    {
                        if (ViewState["dotype"].ToString() == "2")
                        {
                            loadpaytype();
                            LoadData1(); //数据加载
                        }

                        else
                        {
                            if (ViewState["roletype"].ToString() == "2")
                            {
                                loadpaytype();
                                LoadData1(); //数据加载
                            }
                            else
                            {
                                DataTable dt_one    = DAL.DBHelper.ExecuteDataTable("select ordertype from memberorder where OrderID=" + strs[0]);
                                string    ordertype = dt_one.Rows[0]["ordertype"].ToString(); //订单类型
                                loadpaytype();
                                LoadData(ordertype);                                          //数据加载
                            }
                        }
                        ViewState["loginnumber"] = loginnumber;

                        //店铺离线支付
                        if (DocTypeTableDAL.Getpaytypeisusebyid(1, 1) || DocTypeTableDAL.Getpaytypeisusebyid(6, 5))
                        {
                            Loadmk(); //生成标识
                        }
                    }
                    else
                    {
                        Response.Redirect("payerror1.aspx");
                    }
                }
                else
                {
                    Response.Redirect("payerror1.aspx");
                }
            }
            else
            {
                Response.Redirect("../default.aspx");
            }
        }
    }
Exemplo n.º 29
0
    /// <summary>
    /// 绑定数据
    /// </summary>
    private void DataBind()
    {
        StringBuilder sb    = new StringBuilder();
        string        table = "";

        //会员
        if (ViewState["Kmtype"].ToString() == "AccountXJ")//现金账户
        {
            table = "memberaccount"; sb.Append("and number='" + Session["Member"].ToString() + "' and SfType=1 and happenmoney!=0");
        }
        else if (ViewState["Kmtype"].ToString() == "AccountXF")//消费账户
        {
            table = "memberaccount"; sb.Append("and number='" + Session["Member"].ToString() + "' and SfType=0 and happenmoney!=0");
        }
        else if (ViewState["Kmtype"].ToString() == "AccountFX")//复消账户
        {
            table = "memberaccount"; sb.Append("and number='" + Session["Member"].ToString() + "' and SfType=2 and happenmoney!=0");
        }
        else if (ViewState["Kmtype"].ToString() == "AccountFXth")//复消提货账户
        {
            table = "memberaccount"; sb.Append("and number='" + Session["Member"].ToString() + "' and SfType=3 and happenmoney!=0");
        }
        else if (ViewState["Kmtype"].ToString() == "AccountZSJF")//赠送积分
        {
            table = "memberaccount"; sb.Append("and number='" + Session["Member"].ToString() + "' and SfType=4 and happenmoney!=0");
        }
        else if (ViewState["Kmtype"].ToString() == "AccountSFJF")//释放积分
        {
            table = "memberaccount"; sb.Append("and number='" + Session["Member"].ToString() + "' and SfType=5 and happenmoney!=0");
        }

        //店铺
        else if (ViewState["Kmtype"].ToString() == "AccountDH")//订货款账户
        {
            table = "storeaccount"; sb.Append("and number='" + Session["Store"].ToString() + "' and SfType=0 and happenmoney!=0");
        }
        else if (ViewState["Kmtype"].ToString() == "AccountZZ")//周转款账户
        {
            table = "storeaccount"; sb.Append("and number='" + Session["Store"].ToString() + "' and SfType=1 and happenmoney!=0");
        }

        string BeginRiQi = "";
        string EndRiQi   = "";

        string kmtype = Request.Form["chb_name"];

        if (kmtype != null)
        {
            sb.Append(" and kmtype in(" + kmtype + ")");
        }
        if (ddl_OutIn.SelectedValue != "-1")
        {
            sb.Append(" and Direction=" + ddl_OutIn.SelectedValue);
        }

        if (this.Datepicker1.Text != "")
        {
            DateTime time = DateTime.Now.ToUniversalTime();
            bool     b    = DateTime.TryParse(Datepicker1.Text.Trim(), out time);
            if (!b)
            {
                Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('" + GetTran("000827", "时间格式不正确!") + "')</script>");
                return;
            }
            BeginRiQi = this.Datepicker1.Text.Trim().ToString();
            DisposeString.DisString(BeginRiQi, "'", "");
            if (this.Datepicker2.Text != "")
            {
                b = DateTime.TryParse(Datepicker2.Text.Trim(), out time);
                if (!b)
                {
                    Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('" + GetTran("000827", "时间格式不正确!") + "')</script>");
                    return;
                }
                EndRiQi = (DateTime.Parse(this.Datepicker2.Text).AddHours(23).AddMinutes(59).AddSeconds(59)).ToString();
                DisposeString.DisString(EndRiQi, "'", "");

                sb.Append(" and happentime>= '" + BeginRiQi + "' and happentime<='" + EndRiQi + "'");
            }
            else
            {
                sb.Append(" and happentime>= '" + BeginRiQi + "'");
            }
        }
        else
        {
            if (this.Datepicker2.Text != "")
            {
                DateTime time = DateTime.Now.ToUniversalTime();
                bool     b    = DateTime.TryParse(Datepicker2.Text.Trim(), out time);
                if (!b)
                {
                    Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('" + GetTran("000827", "时间格式不正确!") + "')</script>");
                    return;
                }
                EndRiQi = (DateTime.Parse(this.Datepicker2.Text.Trim()).AddHours(23).AddMinutes(59).AddSeconds(59)).ToString();
                sb.Append(" and happentime<='" + EndRiQi + "'");
            }
        }
        ViewState["Sql"] = "select isnull(sum(ABS(isnull(happenmoney,0))),0) as happenmoney from " + table + " where 1=1  " + sb.ToString();
        //获取汇率
        currency = AjaxClass.GetCurrency(int.Parse(Session["Default_Currency"] == null ? bzCurrency.ToString() : Session["Default_Currency"].ToString()));
        //转入0  转出1
        happenmoney = "happenmoney*" + currency + " as happenmoney";
        //结余金额
        string Balancemoney = "Balancemoney*" + currency + " as Balancemoney";
        //
        string cloumns = "id,number,happentime,Direction,sftype,kmtype,remark" + "," + happenmoney + "," + Balancemoney;
        string key     = "id";

        if (table != "")
        {
            lit_heji.Text = GetHappenMoney(ViewState["Sql"].ToString());
            string sql = "select " + cloumns + " from " + table + " where 1=1  " + sb.ToString() + " order by " + key + " desc ";
            this.ucPagerMb1.PageSize = 10;
            this.ucPagerMb1.PageInit(sql, rep_km.UniqueID);
        }
        else
        {
            Response.Redirect("../member/index.aspx");
        }
    }
Exemplo n.º 30
0
    protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.RowType == DataControlRowType.Header)
        {
            string sql = ViewState["sql"].ToString();
            sql = sql.Replace("|*|", " " + (1 - 1) * 10 + " ");
            dt2 = DAL.DBHelper.ExecuteDataTable(sql);
        }
        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            e.Row.Attributes.Add("onmouseover", "bg=this.style.backgroundColor;this.style.backgroundColor='#FFFFCC'");
            e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor=bg");
            IDictionaryEnumerator myEnumerator = StringOfNumtable.GetEnumerator();

            foreach (TableCell cell in e.Row.Cells)
            {
                cell.Text = cell.Text.Replace("&lt;", "<");
                cell.Text = cell.Text.Replace("&gt;", ">");
                cell.Text = cell.Text.Replace("&lt", "<");
                cell.Text = cell.Text.Replace("&nbsp;", "");
                cell.Text = cell.Text.Replace("&amp;nbsp;", "");
                try
                {
                    DateTime time = DateTime.Parse(cell.Text);
                }
                catch
                {
                }
            }


            for (int i = 0; i < dt2.Columns.Count; i++)
            {
                string name = dt2.Columns[i].ColumnName;
                if (name == GetTran("000000", "安置人姓名"))
                {
                    e.Row.Cells[i].Text = Encryption.Encryption.GetDecipherName(e.Row.Cells[i].Text);
                }
                else if (name == GetTran("000000", "推荐人姓名"))
                {
                    e.Row.Cells[i].Text = Encryption.Encryption.GetDecipherName(e.Row.Cells[i].Text);
                }
                else if (name == GetTran("000025", "会员姓名"))
                {
                    e.Row.Cells[i].Text = Encryption.Encryption.GetDecipherName(e.Row.Cells[i].Text);
                }
                else if (name == GetTran("000085", "性别"))
                {
                    if (e.Row.Cells[i].Text == "0")
                    {
                        e.Row.Cells[i].Text = "女";
                    }
                    else
                    {
                        e.Row.Cells[i].Text = "男";
                    }
                }
                else if (name == GetTran("000086", "开户名"))
                {
                    e.Row.Cells[i].Text = Encryption.Encryption.GetDecipherName(e.Row.Cells[i].Text);
                }
                else if (name == GetTran("000065", "家庭电话"))
                {
                    e.Row.Cells[i].Text = Encryption.Encryption.GetDecipherTele(e.Row.Cells[i].Text);
                }
                else if (name == GetTran("000044", "办公电话"))
                {
                    e.Row.Cells[i].Text = Encryption.Encryption.GetDecipherTele(e.Row.Cells[i].Text);
                }
                else if (name == GetTran("000069", "移动电话"))
                {
                    e.Row.Cells[i].Text = Encryption.Encryption.GetDecipherTele(e.Row.Cells[i].Text);
                }
                else if (name == GetTran("000071", "传真电话"))
                {
                    e.Row.Cells[i].Text = Encryption.Encryption.GetDecipherTele(e.Row.Cells[i].Text);
                }
                else if (name == GetTran("000083", "证件号码"))
                {
                    e.Row.Cells[i].Text = Encryption.Encryption.GetDecipherNumber(e.Row.Cells[i].Text);
                }
                else if (name == GetTran("000923", "卡号"))
                {
                    e.Row.Cells[i].Text = Encryption.Encryption.GetDecipherCard(e.Row.Cells[i].Text);
                }
                else if (name == GetTran("000111", "银行账号"))
                {
                    e.Row.Cells[i].Text = Encryption.Encryption.GetDecipherName(e.Row.Cells[i].Text);
                }
                else if (name == GetTran("000920", "详细地址"))
                {
                    e.Row.Cells[i].Text = Encryption.Encryption.GetDecipherAddress(e.Row.Cells[i].Text);
                }
                else if (name == GetTran("000057", "注册日期"))
                {
                    e.Row.Cells[i].Text = PageBase.GetbyDT(e.Row.Cells[i].Text);
                }
                else if (name == GetTran("000105", "出生日期"))
                {
                    e.Row.Cells[i].Text = Convert.ToDateTime(e.Row.Cells[i].Text).ToString("yyyy-MM-dd");
                }
                else if (name == GetTran("000916", "国家省份城市"))
                {
                    CityModel model = DAL.CommonDataDAL.GetCPCCode(e.Row.Cells[i].Text.Trim());
                    e.Row.Cells[i].Text = model.Country + model.Province + model.City;
                }
                else if (name == GetTran("000087", "开户银行"))
                {
                    e.Row.Cells[i].Text = DAL.CommonDataDAL.GetBankName(e.Row.Cells[i].Text.Trim());
                }
                else if (name == "新人激励奖")
                {
                    if (AjaxClass.GetCurrency(Convert.ToInt32(Session["currency"]), Convert.ToInt32(DropCurrency.SelectedValue)) == 0)
                    {
                        e.Row.Cells[i].Text = "0";
                    }
                    else
                    {
                        if (e.Row.Cells[i].Text != "")
                        {
                            e.Row.Cells[i].Text = (Convert.ToDouble(e.Row.Cells[i].Text) / AjaxClass.GetCurrency(Convert.ToInt32(Session["currency"]), Convert.ToInt32(DropCurrency.SelectedValue))).ToString("f2");
                        }
                        else
                        {
                            e.Row.Cells[i].Text = "0";
                        }
                    }
                }
                else if (name == "组织奖")
                {
                    if (AjaxClass.GetCurrency(Convert.ToInt32(Session["currency"]), Convert.ToInt32(DropCurrency.SelectedValue)) == 0)
                    {
                        e.Row.Cells[i].Text = "0";
                    }
                    else
                    {
                        if (e.Row.Cells[i].Text != "")
                        {
                            e.Row.Cells[i].Text = (Convert.ToDouble(e.Row.Cells[i].Text) / AjaxClass.GetCurrency(Convert.ToInt32(Session["currency"]), Convert.ToInt32(DropCurrency.SelectedValue))).ToString("f2");
                        }
                        else
                        {
                            e.Row.Cells[i].Text = "0";
                        }
                    }
                }
                else if (name == " 辅导奖")
                {
                    if (AjaxClass.GetCurrency(Convert.ToInt32(Session["currency"]), Convert.ToInt32(DropCurrency.SelectedValue)) == 0)
                    {
                        e.Row.Cells[i].Text = "0";
                    }
                    else
                    {
                        if (e.Row.Cells[i].Text != "")
                        {
                            e.Row.Cells[i].Text = (Convert.ToDouble(e.Row.Cells[i].Text) / AjaxClass.GetCurrency(Convert.ToInt32(Session["currency"]), Convert.ToInt32(DropCurrency.SelectedValue))).ToString("f2");
                        }
                        else
                        {
                            e.Row.Cells[i].Text = "0";
                        }
                    }
                }
                else if (name == "互动奖")
                {
                    if (AjaxClass.GetCurrency(Convert.ToInt32(Session["currency"]), Convert.ToInt32(DropCurrency.SelectedValue)) == 0)
                    {
                        e.Row.Cells[i].Text = "0";
                    }
                    else
                    {
                        if (e.Row.Cells[i].Text != "")
                        {
                            e.Row.Cells[i].Text = (Convert.ToDouble(e.Row.Cells[i].Text) / AjaxClass.GetCurrency(Convert.ToInt32(Session["currency"]), Convert.ToInt32(DropCurrency.SelectedValue))).ToString("f2");
                        }
                        else
                        {
                            e.Row.Cells[i].Text = "0";
                        }
                    }
                }
                else if (name == "销售提成")
                {
                    if (AjaxClass.GetCurrency(Convert.ToInt32(Session["currency"]), Convert.ToInt32(DropCurrency.SelectedValue)) == 0)
                    {
                        e.Row.Cells[i].Text = "0";
                    }
                    else
                    {
                        if (e.Row.Cells[i].Text != "")
                        {
                            e.Row.Cells[i].Text = (Convert.ToDouble(e.Row.Cells[i].Text) / AjaxClass.GetCurrency(Convert.ToInt32(Session["currency"]), Convert.ToInt32(DropCurrency.SelectedValue))).ToString("f2");
                        }
                        else
                        {
                            e.Row.Cells[i].Text = "0";
                        }
                    }
                }
                else if (name == "销售分红")
                {
                    if (AjaxClass.GetCurrency(Convert.ToInt32(Session["currency"]), Convert.ToInt32(DropCurrency.SelectedValue)) == 0)
                    {
                        e.Row.Cells[i].Text = "0";
                    }
                    else
                    {
                        if (e.Row.Cells[i].Text != "")
                        {
                            e.Row.Cells[i].Text = (Convert.ToDouble(e.Row.Cells[i].Text) / AjaxClass.GetCurrency(Convert.ToInt32(Session["currency"]), Convert.ToInt32(DropCurrency.SelectedValue))).ToString("f2");
                        }
                        else
                        {
                            e.Row.Cells[i].Text = "0";
                        }
                    }
                }
                else if (name == "管理奖")
                {
                    if (AjaxClass.GetCurrency(Convert.ToInt32(Session["currency"]), Convert.ToInt32(DropCurrency.SelectedValue)) == 0)
                    {
                        e.Row.Cells[i].Text = "0";
                    }
                    else
                    {
                        if (e.Row.Cells[i].Text != "")
                        {
                            e.Row.Cells[i].Text = (Convert.ToDouble(e.Row.Cells[i].Text) / AjaxClass.GetCurrency(Convert.ToInt32(Session["currency"]), Convert.ToInt32(DropCurrency.SelectedValue))).ToString("f2");
                        }
                        else
                        {
                            e.Row.Cells[i].Text = "0";
                        }
                    }
                }
                else if (name == "物流中心补贴")
                {
                    if (AjaxClass.GetCurrency(Convert.ToInt32(Session["currency"]), Convert.ToInt32(DropCurrency.SelectedValue)) == 0)
                    {
                        e.Row.Cells[i].Text = "0";
                    }
                    else
                    {
                        if (e.Row.Cells[i].Text != "")
                        {
                            e.Row.Cells[i].Text = (Convert.ToDouble(e.Row.Cells[i].Text) / AjaxClass.GetCurrency(Convert.ToInt32(Session["currency"]), Convert.ToInt32(DropCurrency.SelectedValue))).ToString("f2");
                        }
                        else
                        {
                            e.Row.Cells[i].Text = "0";
                        }
                    }
                }
                else if (name == "网上报单中心补贴")
                {
                    if (AjaxClass.GetCurrency(Convert.ToInt32(Session["currency"]), Convert.ToInt32(DropCurrency.SelectedValue)) == 0)
                    {
                        e.Row.Cells[i].Text = "0";
                    }
                    else
                    {
                        if (e.Row.Cells[i].Text != "")
                        {
                            e.Row.Cells[i].Text = (Convert.ToDouble(e.Row.Cells[i].Text) / AjaxClass.GetCurrency(Convert.ToInt32(Session["currency"]), Convert.ToInt32(DropCurrency.SelectedValue))).ToString("f2");
                        }
                        else
                        {
                            e.Row.Cells[i].Text = "0";
                        }
                    }
                }
                else if (name == GetTran("000247", "总计"))
                {
                    if (AjaxClass.GetCurrency(Convert.ToInt32(Session["currency"]), Convert.ToInt32(DropCurrency.SelectedValue)) == 0)
                    {
                        e.Row.Cells[i].Text = "0";
                    }
                    else
                    {
                        if (e.Row.Cells[i].Text != "")
                        {
                            e.Row.Cells[i].Text = (Convert.ToDouble(e.Row.Cells[i].Text) / AjaxClass.GetCurrency(Convert.ToInt32(Session["currency"]), Convert.ToInt32(DropCurrency.SelectedValue))).ToString("f2");
                        }
                        else
                        {
                            e.Row.Cells[i].Text = "0";
                        }
                    }
                }
                else if (name == GetTran("000249", "扣税"))
                {
                    if (AjaxClass.GetCurrency(Convert.ToInt32(Session["currency"]), Convert.ToInt32(DropCurrency.SelectedValue)) == 0)
                    {
                        e.Row.Cells[i].Text = "0";
                    }
                    else
                    {
                        if (e.Row.Cells[i].Text != "")
                        {
                            e.Row.Cells[i].Text = (Convert.ToDouble(e.Row.Cells[i].Text) / AjaxClass.GetCurrency(Convert.ToInt32(Session["currency"]), Convert.ToInt32(DropCurrency.SelectedValue))).ToString("f2");
                        }
                        else
                        {
                            e.Row.Cells[i].Text = "0";
                        }
                    }
                }
                else if (name == GetTran("000251", "扣款"))
                {
                    if (AjaxClass.GetCurrency(Convert.ToInt32(Session["currency"]), Convert.ToInt32(DropCurrency.SelectedValue)) == 0)
                    {
                        e.Row.Cells[i].Text = "0";
                    }
                    else
                    {
                        if (e.Row.Cells[i].Text != "")
                        {
                            e.Row.Cells[i].Text = (Convert.ToDouble(e.Row.Cells[i].Text) / AjaxClass.GetCurrency(Convert.ToInt32(Session["currency"]), Convert.ToInt32(DropCurrency.SelectedValue))).ToString("f2");
                        }
                        else
                        {
                            e.Row.Cells[i].Text = "0";
                        }
                    }
                }
                else if (name == GetTran("000254", "实发"))
                {
                    if (AjaxClass.GetCurrency(Convert.ToInt32(Session["currency"]), Convert.ToInt32(DropCurrency.SelectedValue)) == 0)
                    {
                        e.Row.Cells[i].Text = "0";
                    }
                    else
                    {
                        if (e.Row.Cells[i].Text != "")
                        {
                            e.Row.Cells[i].Text = (Convert.ToDouble(e.Row.Cells[i].Text) / AjaxClass.GetCurrency(Convert.ToInt32(Session["currency"]), Convert.ToInt32(DropCurrency.SelectedValue))).ToString("f2");
                        }
                        else
                        {
                            e.Row.Cells[i].Text = "0";
                        }
                    }
                }
                else if (name == GetTran("000951", "总计累计"))
                {
                    if (AjaxClass.GetCurrency(Convert.ToInt32(Session["currency"]), Convert.ToInt32(DropCurrency.SelectedValue)) == 0)
                    {
                        e.Row.Cells[i].Text = "0";
                    }
                    else
                    {
                        if (e.Row.Cells[i].Text != "")
                        {
                            e.Row.Cells[i].Text = (Convert.ToDouble(e.Row.Cells[i].Text) / AjaxClass.GetCurrency(Convert.ToInt32(Session["currency"]), Convert.ToInt32(DropCurrency.SelectedValue))).ToString("f2");
                        }
                        else
                        {
                            e.Row.Cells[i].Text = "0";
                        }
                    }
                }
                else if (name == GetTran("000953", "实发累计"))
                {
                    if (AjaxClass.GetCurrency(Convert.ToInt32(Session["currency"]), Convert.ToInt32(DropCurrency.SelectedValue)) == 0)
                    {
                        e.Row.Cells[i].Text = "0";
                    }
                    else
                    {
                        if (e.Row.Cells[i].Text != "")
                        {
                            e.Row.Cells[i].Text = (Convert.ToDouble(e.Row.Cells[i].Text) / AjaxClass.GetCurrency(Convert.ToInt32(Session["currency"]), Convert.ToInt32(DropCurrency.SelectedValue))).ToString("f2");
                        }
                        else
                        {
                            e.Row.Cells[i].Text = "0";
                        }
                    }
                }
                else if (name == GetTran("007598", "董事"))
                {
                    string sql = "select levelstr from bsco_level where levelflag=2 and levelint=" + e.Row.Cells[i].Text;
                    e.Row.Cells[i].Text = DAL.DBHelper.ExecuteScalar(sql) == null ? " " : DAL.DBHelper.ExecuteScalar(sql).ToString();
                }
                else if (name == GetTran("007273", "资格"))
                {
                    string sql = "select levelstr from bsco_level where levelflag=0 and levelint=" + e.Row.Cells[i].Text;
                    e.Row.Cells[i].Text = DAL.DBHelper.ExecuteScalar(sql) == null ? " " : DAL.DBHelper.ExecuteScalar(sql).ToString();
                }
                else if (name == GetTran("007460", "总监"))
                {
                    string sql = "select levelstr from bsco_level where levelflag=3 and levelint=" + e.Row.Cells[i].Text;
                    e.Row.Cells[i].Text = DAL.DBHelper.ExecuteScalar(sql) == null ? " " : DAL.DBHelper.ExecuteScalar(sql).ToString();
                }
                else if (name == GetTran("000936", "新网分数") || name == GetTran("000937", "总网分数") || name == GetTran("000939", "新个分数") ||
                         name == GetTran("000940", "总个分数") || name == GetTran("000942", "未付款的总个分数") || name == GetTran("000944", "未付款的总网分数"))
                {
                    e.Row.Cells[i].Text = Convert.ToDouble(e.Row.Cells[i].Text.ToString()).ToString("f2");
                }
            }

            while (myEnumerator.MoveNext())
            {
                e.Row.Cells[(int)myEnumerator.Key].Attributes.Add("style", "vnd.ms-excel.numberformat:@");
            }
            IDictionaryEnumerator myEnumerator1 = table.GetEnumerator();
            while (myEnumerator1.MoveNext())
            {
                e.Row.Cells[(int)myEnumerator1.Key].HorizontalAlign = HorizontalAlign.Right;
            }
        }

        if (e.Row.RowType == DataControlRowType.Footer)
        {
            IDictionaryEnumerator myEnumerator = table.GetEnumerator();

            while (myEnumerator.MoveNext())
            {
                if (AjaxClass.GetCurrency(Convert.ToInt32(Session["currency"]), Convert.ToInt32(DropCurrency.SelectedValue)) == 0)
                {
                    e.Row.Cells[(int)myEnumerator.Key].Text = "0";
                }
                else
                {
                    e.Row.Cells[(int)myEnumerator.Key].Text = (Convert.ToDouble(myEnumerator.Value) / AjaxClass.GetCurrency(Convert.ToInt32(Session["currency"]), Convert.ToInt32(DropCurrency.SelectedValue))).ToString("f2");
                }
                e.Row.Cells[(int)myEnumerator.Key].HorizontalAlign = HorizontalAlign.Right;
                string name = dt2.Columns[(int)myEnumerator.Key].ColumnName;
                if (name == GetTran("000933", "总网人数") || name == GetTran("000934", "新网人数"))
                {
                    e.Row.Cells[(int)myEnumerator.Key].Text = Convert.ToDouble(e.Row.Cells[(int)myEnumerator.Key].Text).ToString();
                }
            }

            e.Row.Cells[0].Text = GetTran("000630", "合计");

            if (GridView1.PageIndex == GridView1.PageCount - 1)
            {
                GridView1.ShowFooter = true;
            }
            else
            {
                GridView1.ShowFooter = false;
            }
        }
        else if (e.Row.RowType == DataControlRowType.Header)
        {
            for (int i = 0; i < e.Row.Cells.Count; i++)
            {
                e.Row.Cells[i].Text = "&nbsp;&nbsp;&nbsp;" + e.Row.Cells[i].Text + "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
            }

            e.Row.Attributes.Add("style", "background-image:url('images/tabledp.gif')");
        }
    }