Ejemplo n.º 1
0
    /// <summary>
    /// 页面加载事件
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void Page_Load(object sender, EventArgs e)
    {
        Permissions.ComRedirect(Page, Permissions.redirUrl);
        this.lblMoney.Text = new RegistermemberBLL().GetLeftRegisterMemberMoney(GetStoreId());
        //获得语言

        if (!IsPostBack)
        {
            //绑定货币下拉框
            AddOrderBLL.BindCurrency_Rate(this.DropCurrency, GetStoreId());
            CommonDataBLL.GetPaymentType(rdPayType, 2);
            if (IsEdit())
            {
                EditBind();
            }
            else
            {
                AddBind();
                GetBindAddress();
            }
        }
        else
        {
            savePageDisp();
        }

        Translations();
    }
Ejemplo n.º 2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Permissions.ComRedirect(Page, Permissions.redirUrl);
        Response.Cache.SetExpires(DateTime.Now);
        Permissions.CheckManagePermission(EnumCompanyPermission.LogisticsBillOutOrder);

        AjaxPro.Utility.RegisterTypeForAjax(typeof(AjaxClass));

        if (!IsPostBack)
        {
            AddOrderBLL.BindCurrency_Rate(Dropdownlist2);
            Dropdownlist2.SelectedValue = CountryBLL.GetCurrency();

            ViewState["GridViewID"] = "GridView_BillOutOrder";

            this.DropCurrery.DataSource     = CountryBLL.GetCountryModels();
            this.DropCurrery.DataTextField  = "name";
            this.DropCurrery.DataValueField = "id";
            this.DropCurrery.DataBind();

            btn_Submit_Click(null, null);

            SetFanY();

            DropDownList_Items_SelectedIndexChanged(null, null);
        }
    }
Ejemplo n.º 3
0
    private void Page_Load(object sender, System.EventArgs e)
    {
        Permissions.ComRedirect(Page, Permissions.redirUrl);
        this.Btn_Detail.Click += new System.EventHandler(this.Btn_Detail_Click);

        if (!IsPostBack)
        {
            Response.Cache.SetExpires(DateTime.Now);
            Permissions.CheckManagePermission(EnumCompanyPermission.ReportOrderDetail);

            DateTime dt = DateTime.Now;
            string   t  = dt.Year.ToString() + "-" + dt.Month.ToString() + "-" + dt.Day.ToString();

            this.DatePicker1.Text = DateTime.Now.AddMonths(-1).ToString("yyyy-MM-dd");
            this.DatePicker2.Text = DateTime.Now.ToString("yyyy-MM-dd");
            Btn_Detail_Click(null, null);
            Bind();
        }

        AjaxPro.Utility.RegisterTypeForAjax(typeof(AjaxClass));
        AddOrderBLL.BindCurrency_Rate(Dropdownlist1);
        Dropdownlist1.SelectedValue = CountryBLL.GetCurrency();

        // 在此处放置用户代码以初始化页面
        Session["language"]       = LanguageBLL.GetDefaultLanguageTableName();
        Session["LanguegeSelect"] = LanguageBLL.GetDefaultlLanguageName();


        Translations();
    }
Ejemplo n.º 4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        AjaxPro.Utility.RegisterTypeForAjax(typeof(AjaxClass));
        Permissions.MemRedirect(Page, Permissions.redirUrl);
        translation();

        if (!IsPostBack)
        {
            try
            {
                string res = Request.QueryString["res"] == "" ? "" : Request.QueryString["res"];
                if (Request.UrlReferrer.ToString().IndexOf("/PassWordManage/CheckAdv.aspx?type=member&url=MemberInfo") < 0 || res != "success")
                {
                    Response.Redirect("../PassWordManage/CheckAdv.aspx?type=member&url=MemberInfo");
                    return;
                }
                else
                {
                    table2.Visible = true;
                }
            }
            catch
            {
                Response.Redirect("../PassWordManage/CheckAdv.aspx?type=member&url=MemberInfo");
            }

            if (Session["Member"].ToString() != string.Empty)
            {
                BindCountry();
                ddlCountry.SelectedIndex = 1;
                GetOldMemberData(Session["Member"].ToString());

                int countryId = new AddOrderBLL().GetCountryId(ddlCountry.SelectedItem.Text);
                //获得语言
                Session["language"]         = Session["language"] == null ? ("chinese") : (Session["language"].ToString());
                this.DdlBank.DataSource     = new AddOrderBLL().GetBank(countryId, Session["language"].ToString());
                this.DdlBank.DataTextField  = "BankName";
                this.DdlBank.DataValueField = "BankCode";
                this.DdlBank.DataBind();

                if (ViewState["bankcode"] != null)
                {
                    foreach (ListItem li in DdlBank.Items)
                    {
                        if (li.Value == ViewState["bankcode"].ToString())
                        {
                            li.Selected = true;
                            break;
                        }
                    }
                }
            }
            else
            {
                Page.ClientScript.RegisterStartupScript(GetType(), null, "<script language='javascript'>alert('" + GetTran("001206", "参数错误!") + GetTran("007703", "重新登陆") + "!');location.href('../index.aspx')</script>", false);
                return;
            }
        }
    }
Ejemplo n.º 5
0
 protected void Ddzf_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (this.rdPayType.SelectedValue == "2")
     {
         this.DropCurrency.SelectedIndex = 0;
         this.DropCurrency.Enabled       = false;
         this.dzpanel.Visible            = true;
     }
     else
     {
         this.DropCurrency.Enabled = true;
         this.dzpanel.Visible      = false;
         AddOrderBLL.BindCurrency_Rate(this.DropCurrency, GetStoreId());
     }
 }
Ejemplo n.º 6
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Permissions.MemRedirect(Page, Permissions.redirUrl);
        //首次页面加载
        if (!IsPostBack)
        {
            Bind();
            this.DataBind();
        }
        Translations();

        AjaxPro.Utility.RegisterTypeForAjax(typeof(AjaxClass));
        AddOrderBLL.BindCurrency_Rate(Dropdownlist1);
        Dropdownlist1.SelectedValue = CountryBLL.GetCurrency();
    }
Ejemplo n.º 7
0
    protected void TxtStore_TextChanged(object sender, EventArgs e)
    {
        //验证店铺编号是否存在
        if (!MemberOrderAgainBLL.CheckStore(GetStoreId()))
        {
            ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "click", "alert('" + GetTran("001779", "对不起,您输入的店铺不存在!") + "');", true);
            return;
        }

        //绑定产品树
        ProductTree myTree = new ProductTree();

        this.menuLabel.Text = myTree.getMenu10(GetStoreId());
        AddOrderBLL.BindCurrency_Rate(this.DropCurrency, GetStoreId());
    }
Ejemplo n.º 8
0
    /// <summary>
    /// 更新树
    /// </summary>
    /// <param name="orderId">订单id</param>
    public void UptTree(string orderId)
    {
        AddOrderBLL addOrderBLL        = new AddOrderBLL();
        string      result             = "<script language='javascript'>";
        List <MemberDetailsModel> list = addOrderBLL.GetDetails(orderId);

        foreach (MemberDetailsModel memberDetailsModel in list)
        {
            this.hidpids.Value += ",N" + memberDetailsModel.ProductId;
            result              = result + "Form1.N" + memberDetailsModel.ProductId + ".value=" + memberDetailsModel.Quantity;
            result             += ";";
        }
        result          += "</script>";
        this.Label1.Text = result;
    }
Ejemplo n.º 9
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Permissions.ComRedirect(Page, Permissions.redirUrl);
        AjaxPro.Utility.RegisterTypeForAjax(typeof(AjaxClass));
        AddOrderBLL.BindCurrency_Rate(ddlCurrency);

        if (!IsPostBack)
        {
            BLL.CommonClass.CommonDataBLL.BindQishuList(ddlVolume, true);
            BindCompare();
            string storeId = Session["Store"] == null ? "" : Session["Store"].ToString();//测试用

            QueryWhere(storeId, Convert.ToInt32(ddlVolume.SelectedValue), "", "", "");
        }
        Translations();
    }
Ejemplo n.º 10
0
    /// <summary>
    /// 页面加载事件
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void Page_Load(object sender, EventArgs e)
    {
        Permissions.MemRedirect(Page, Permissions.redirUrl);
        Response.Cache.SetExpires(DateTime.Now);
        AjaxPro.Utility.RegisterTypeForAjax(typeof(AjaxClass));
        if (!IsPostBack)
        {
            //绑定货币下拉框
            AddOrderBLL.BindCurrency_Rate(this.DropCurrency);
            // CommonDataBLL.GetPaymentType(rdPayType, 6);

            //防止重复提交
            go.Attributes["realvalue"] = "0";
            go.Attributes["onclick"]   = "if(navigator.userAgent.toLowerCase().indexOf('ie')!=-1){this.realvalue   ++;if(this.realvalue==1){if (confirm('" + GetTran("007151", "确定提交吗?") + "?')) {return true;} else {this.realvalue=0; return false;}}else{alert('" + GetTran("000792", "不可重复提交") + "!');return false}}else{int(this.btnReg.getAttribute['realvalue'])   ++;if(int(this.btnReg.getAttribute['realvalue'])==1){if (confirm('" + GetTran("007151", "确定提交吗?") + "?')) {return true;} else {int(this.btnReg.getAttribute['realvalue'])=0; return false;}}else{alert('" + GetTran("000792", "不可重复提交") + "!');return false}}";

            if (IsEdit())
            {
                EditBind();
            }
            else
            {
                if (Session["proList"] != null && Session["proList"] != null)
                {
                    ArrayList list = (ArrayList)Session["proList"];

                    ShoppingBind(list);

                    GetBindAddress();
                }
                else
                {
                    AddBind();
                    GetBindAddress();
                }
            }
        }
        else
        {
            savePageDisp();
        }

        Translations();
    }
Ejemplo n.º 11
0
    /// <summary>
    /// 页面加载事件
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void Page_Load(object sender, EventArgs e)
    {
        Response.Cache.SetExpires(DateTime.Now);
        //ajaxPro注册1111111111
        AjaxPro.Utility.RegisterTypeForAjax(typeof(AjaxMemShopCart));

        DD1.Visible = false;
        DD2.Visible = false;
        if (!IsPostBack)
        {
            sp1.Visible = false;

            CommonDataBLL.BindQishuList(this.ddlQishu, false);

            setProductMenu(GetStoreId());

            AddOrderBLL.BindCurrency_Rate(DropCurrency, GetStoreId());

            new GroupRegisterBLL().GetPaymentType(Ddzf, 1);
        }
    }
Ejemplo n.º 12
0
    /// <summary>
    /// 更新树
    /// </summary>
    /// <param name="orderId">订单id</param>
    public void UptTree(string orderId)
    {
        this.hidpids.Value = "";
        AddOrderBLL addOrderBLL = new AddOrderBLL();
        string      result      = "<script language='javascript'>";

        if (orderId.Length > 12)
        {
            orderId = orderId.Substring(0, 12);
        }
        List <MemberDetailsModel> list = addOrderBLL.GetDetails(orderId);

        foreach (MemberDetailsModel memberDetailsModel in list)
        {
            this.hidpids.Value += ",N" + memberDetailsModel.ProductId;
            result              = result + "Form1.N" + memberDetailsModel.ProductId + ".value=" + memberDetailsModel.Quantity;
            result             += ";";
        }
        result += "</script>";
        this.txt_jsLable.Text = result;
    }
Ejemplo n.º 13
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Permissions.ThreeRedirect(Page, "Member/" + Permissions.redirUrl);
        string OrderId = Request.QueryString["OrderID"].ToString();
        string bianhao = Request.QueryString["Number"].ToString();

        double dpm = Convert.ToDouble(DAL.DBHelper.ExecuteScalar("select totalaccountmoney-totalordergoodmoney from storeinfo where storeid='" + GetStoreID() + "'"));

        lblMoney.Text    = dpm + "";
        ViewState["dpm"] = dpm;

        AjaxPro.Utility.RegisterTypeForAjax(typeof(AjaxClass));

        if (!IsPostBack)
        {
            //绑定菜单树
            setProductMenu(GetStoreID(), OrderId);
            //绑定值
            UptTree(OrderId);

            Label1.Text = bianhao;

            AddOrderBLL.BindCurrency_Rate(DropCurrency, GetStoreID());

            new GroupRegisterBLL().GetPaymentType(Ddzf, 1);

            this.Ddzf.Enabled = false;

            ReaderMemberInfo(bianhao, OrderId);
        }
        else
        {
            //保存更新后的值
            savePageDisp();
        }
        Translations();
    }
Ejemplo n.º 14
0
    protected void gv_browOrder_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        string[] args = e.CommandArgument.ToString().Split(':');
        if (args.Length != 7)
        {
            ScriptHelper.SetAlert(Page, "数据异常");
            return;
        }
        string           orderId     = args[0];//报单ID
        MemberOrderModel mOrderModel = new MemberOrderModel();
        MemberInfoModel  mInfoModel  = null;

        if (args[5].Trim() == "1")
        {
            MemberOrderAgainBLL memberOrderAgainBLL = new MemberOrderAgainBLL();
            memberOrderAgainBLL.WriterDataToPage(mOrderModel, args[6], args[0]);
        }
        else
        {
            mInfoModel = new MemberInfoModel();
            AddOrderBLL AddOrderBLL = new AddOrderBLL();
            AddOrderBLL.GetDataFormInfoAndOrder(args[1], int.Parse(args[4]), args[6], mInfoModel, mOrderModel);
        }
        if (mOrderModel == null)
        {
            ScriptHelper.SetAlert(Page, "当前报单已经不存在.");
            return;
        }
        string number         = args[1];
        string defrayname     = args[2];
        string payStatus      = args[3];
        string orderExpectNum = args[4];
        string isagain        = args[5].ToString();
        string storeId        = args[6].ToString();
        string SqlCon         = System.Configuration.ConfigurationManager.ConnectionStrings["connString"].ConnectionString;

        //如果是修改
        if (e.CommandName == "M")
        {
            //          Permissions.CheckManagePermission(Model.Other.EnumCompanyPermission.BalanceBrowseMemberOrdersEdit);
            if (payStatus == "0")
            {
                //对未支付报单
                if (isagain == "0") //未确认注册修改
                {
                    //Response.Redirect("RegisterMember.aspx?mode=edit&orderId=" + orderId + "&flag=0&number=" + number + "&StoreID=" + storeId);

                    Response.Redirect("../RegisterUpdate1.aspx?OrderID=" + orderId + "&Number=" + number + "&CssType=3&storeId=" + storeId);
                }
                else if (isagain == "1")          //未确认复销修改
                {
                    Response.Redirect("MemberOrderAgain.aspx?mode=edit&orderId=" + orderId + "&ordertype=" + mOrderModel.OrderType + "&flag=0&number=" + number + "&StoreID=" + storeId);

                    // Response.Redirect("../RegisterUpdate1.aspx?OrderID=" + orderId + "&Number=" + number + "&CssType=3&storeId=" + storeId);
                }
                else
                {
                    return;
                }
            }
            else if (payStatus == "1" && defrayname == "1")
            {
                //对已支付报单
                if (isagain == "0")    //已确认注册修改
                {
                    if (mOrderModel.OrderType == 4)
                    {
                        //Response.Redirect("RegisterMember1.aspx?mode=edit&orderId=" + orderId + "&flag=1&number=" + number + "&StoreID=" + storeId + "&except=" + orderExpectNum);
                        Response.Redirect("../RegisterUpdate1.aspx?OrderID=" + orderId + "&Number=" + number + "&CssType=3&storeId=" + storeId + "&tp=1");
                    }
                    else
                    {
                        //Server.Transfer("RegisterMember.aspx?mode=edit&orderId=" + orderId + "&flag=1&number=" + number + "&StoreID=" + storeId+"&ExceptOld=true");

                        Response.Redirect("../RegisterUpdate1.aspx?OrderID=" + orderId + "&Number=" + number + "&CssType=3&storeId=" + storeId);
                    }
                }
                else if (isagain == "1")         //已确认复销修改
                {
                    Response.Redirect("MemberOrderAgain.aspx?mode=edit&orderId=" + orderId + "&ordertype=" + mOrderModel.OrderType + "&flag=1&number=" + number + "&StoreID=" + storeId);
                    //Response.Redirect("../RegisterUpdate1.aspx?OrderID=" + orderId + "&Number=" + number + "&CssType=3&storeId=" + storeId);
                }
                else
                {
                    return;
                }
            }
        }
    }
Ejemplo n.º 15
0
    protected void gv_browOrder_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        if (e.CommandName == "P")
        {
            string    orderid = e.CommandArgument.ToString();
            string    num     = "";
            double    ttmoney = 0;
            DataTable dt      = DBHelper.ExecuteDataTable("select  number,TotalMoney  from memberorder where  orderid='" + orderid + "'");
            if (dt != null && dt.Rows.Count > 0)
            {
                DataRow dr = dt.Rows[0];
                num     = dr["number"].ToString();
                ttmoney = Convert.ToDouble(dr["TotalMoney"]);
                double nep     = Convert.ToDouble(DBHelper.ExecuteScalar("  select CoinnewPrice   from CoinPlant where CoinIndex = 'CoinE' "));
                double nedde   = (ttmoney * 0.05) / nep;
                int    choselv = 1;

                double eblace = Convert.ToDouble(DBHelper.ExecuteScalar("select  pointEin -pointEout as r from memberinfo where  number='" + num + "'"));
                if (nedde > eblace)
                {
                    ScriptHelper.SetAlert(Page, "火星币账户余额不足,不能完成协助支付!");
                    // btnSearch_Click(null, null);
                    return;
                }

                int rr = MemberOrderDAL.PayOrder(num, orderid, 0, 0, 0, nedde, choselv, "USDT账户支付订单,支付中断,后台协助支付");

                if (rr == 1)
                {
                    int ee = MemberOrderDAL.payOrderEcoin(num, orderid, nedde, "E币支付激活,激活成功!");  if (ee == 1)
                    {
                        ScriptHelper.SetAlert(Page, "协助支付成功");
                    }
                    btnSearch_Click(null, null);
                    return;
                }
                else
                {
                    ScriptHelper.SetAlert(Page, "协助支付失败!");
                    btnSearch_Click(null, null);
                    return;
                }
            }
            else
            {
                ClientScript.RegisterStartupScript(this.GetType(), "", "<script>showsuc('订单不存在!');</script>", false);
                btnSearch_Click(null, null);
                return;
            }
        }


        string[] args = e.CommandArgument.ToString().Split(':');
        //if (args.Length != 7)
        //{
        //    ScriptHelper.SetAlert(Page, this.GetTran("001089", "数据异常"));
        //    return;
        //}
        string           orderId     = args[0];//报单ID
        MemberOrderModel mOrderModel = new MemberOrderModel();
        MemberInfoModel  mInfoModel  = null;

        if (args[5].Trim() == "1")
        {
            MemberOrderAgainBLL memberOrderAgainBLL = new MemberOrderAgainBLL();
            memberOrderAgainBLL.WriterDataToPage(mOrderModel, args[6], args[0]);
        }
        else
        {
            mInfoModel = new MemberInfoModel();
            AddOrderBLL AddOrderBLL = new AddOrderBLL();
            AddOrderBLL.GetDataFormInfoAndOrder(args[1], int.Parse(args[4]), args[6], mInfoModel, mOrderModel);
        }
        if (mOrderModel == null)
        {
            ScriptHelper.SetAlert(Page, this.GetTran("001784", "当前报单已经不存在"));
            return;
        }
        string number         = args[1];
        string defrayname     = args[2];
        string payStatus      = args[3];
        string orderExpectNum = args[4];
        string isagain        = args[5].ToString();
        string storeId        = args[6].ToString();
        string SqlCon         = DAL.DBHelper.connString;

        if (e.CommandName == "OK")
        {
            int selectIndex = ((GridViewRow)((LinkButton)e.CommandSource).NamingContainer).RowIndex;
            Permissions.CheckManagePermission(Model.Other.EnumCompanyPermission.BalanceBrowseMemberOrdersEdit);
            if (payStatus == "0")
            {
                if (mOrderModel.IsAgain == 0)
                {
                    string info = MemberOrderAgainBLL.AuditingOrder((sender as LinkButton).CommandArgument.ToString());
                    if (info == "")
                    {
                        ScriptHelper.SetAlert(Page, "支付成功!");
                        btnSearch_Click(null, null);
                    }
                    else
                    {
                        ScriptHelper.SetAlert(Page, info);
                    }
                }
                else if (mOrderModel.IsAgain == 1)
                {
                    string info = MemberOrderAgainBLL.AuditingOrder((sender as LinkButton).CommandArgument.ToString());
                    if (info == "")
                    {
                        ScriptHelper.SetAlert(Page, "支付成功!");
                        btnSearch_Click(null, null);
                    }
                    else
                    {
                        ScriptHelper.SetAlert(Page, info);
                    }
                }
                else
                {
                    ScriptHelper.SetAlert(Page, this.GetTran("001786", "当前报单是否复销类型不正确."));
                    return;
                }
            }
            else
            {
                ScriptHelper.SetAlert(Page, this.GetTran("001789", "已经确认过的报单单不可再确认."));
                return;
            }
            btnSearch_Click(null, null);
        }
        else if (e.CommandName == "M")
        {
            if (payStatus == "0")
            {
                Response.Redirect("../RegisterUpdate1.aspx?OrderID=" + orderId + "&Number=" + number + "&CssType=3&storeId=" + storeId);
                //对未支付报单
                if (isagain == "0") //未确认注册修改
                {
                    Response.Redirect("../RegisterUpdate1.aspx?OrderID=" + orderId + "&Number=" + number + "&CssType=3&storeId=" + storeId);
                }
                else if (isagain == "1")          //未确认复销修改
                {
                    Response.Redirect("MemberOrderAgain.aspx?mode=edit&orderId=" + orderId + "&ordertype=" + mOrderModel.OrderType + "&flag=0&number=" + number + "&StoreID=" + storeId);
                }
                else
                {
                    return;
                }
            }
            else
            {
                ScriptHelper.SetAlert(Page, this.GetTran("000000", "无法对已支付的报单进行修改!"));
            }
        }
        else if (e.CommandName == "D")
        {
            //if (payStatus == "0")
            //{

            if (isagain == "0")
            {
                Application.Lock();
                //注册报单删除
                string result = bll.DelMembersDeclaration(number, mInfoModel.ExpectNum, orderId, mOrderModel.StoreId, Convert.ToDouble(mOrderModel.LackProductMoney));
                //返回null标识没有产生错误
                Application.UnLock();
                if (result == null)
                {
                    result = this.GetTran("000008", "删除成功");
                }
                ScriptHelper.SetAlert(Page, result);
            }
            else if (isagain == "1")
            {
                Application.Lock();
                string result = viewFuXiaoBLL.DelOredrAgain(orderId, double.Parse(mOrderModel.TotalPv.ToString()), number, mOrderModel.OrderExpect, mOrderModel.StoreId);
                Application.UnLock();
                if (result == null)
                {
                    result = this.GetTran("000008", "删除成功");
                }
                ScriptHelper.SetAlert(Page, result);
            }
            btnSearch_Click(null, null);
            //}
            //else
            //{



            //   // ScriptHelper.SetAlert(Page, this.GetTran("000000", "无法删除已支付的报单!"));
            //}
            //btnSearch_Click(null, null);
        }


        else if (e.CommandName == "E")
        {
            if (payStatus == "1")
            {
                string         sql  = @"UPDATE memberorder SET isSend = 1  WHERE OrderID = @orderId";
                SqlParameter[] para =
                {
                    new SqlParameter("@orderId", orderId)
                };
                int idd = DBHelper.ExecuteNonQuery(sql, para, CommandType.Text);
                if (idd == 1)
                {
                    ScriptHelper.SetAlert(Page, "发货成功!");
                }
                else
                {
                    ScriptHelper.SetAlert(Page, "发货失败!");
                }
            }
            else
            {
                ScriptHelper.SetAlert(Page, this.GetTran("000000", "未付款的报单没法发货!"));
            }
            btnSearch_Click(null, null);
        }
    }