Esempio n. 1
0
        private void BindPaymentMode()
        {
            IList <PaymentModeInfo> paymentModes = TradeHelper.GetPaymentModes(PayApplicationType.payOnAll);

            if (paymentModes.Count > 0)
            {
                foreach (PaymentModeInfo item in paymentModes)
                {
                    string text = item.Gateway.ToLower();
                    if (item.IsUseInpour && !text.Equals("hishop.plugins.payment.advancerequest") && !text.Equals("hishop.plugins.payment.bankrequest"))
                    {
                        int modeId;
                        if (text.Equals("hishop.plugins.payment.alipay_shortcut.shortcutrequest"))
                        {
                            HttpCookie httpCookie = HiContext.Current.Context.Request.Cookies["Token_" + HiContext.Current.UserId.ToString()];
                            if (httpCookie != null && !string.IsNullOrEmpty(httpCookie.Value))
                            {
                                ListItemCollection items = this.rbtnPaymentMode.Items;
                                string             name  = item.Name;
                                modeId = item.ModeId;
                                items.Add(new ListItem(name, modeId.ToString()));
                            }
                        }
                        else
                        {
                            ListItemCollection items2 = this.rbtnPaymentMode.Items;
                            string             name2  = item.Name;
                            modeId = item.ModeId;
                            items2.Add(new ListItem(name2, modeId.ToString()));
                        }
                    }
                }
                this.rbtnPaymentMode.SelectedIndex = 0;
            }
        }
Esempio n. 2
0
        void BindPaymentMode()
        {
            IList <PaymentModeInfo> paymentModes = TradeHelper.GetPaymentModes();

            if (paymentModes.Count > 0)
            {
                foreach (PaymentModeInfo info in paymentModes)
                {
                    string str = info.Gateway.ToLower();
                    if ((info.IsUseInpour && !str.Equals("hishop.plugins.payment.advancerequest")) && !str.Equals("hishop.plugins.payment.bankrequest"))
                    {
                        if (str.Equals("hishop.plugins.payment.alipay_shortcut.shortcutrequest"))
                        {
                            HttpCookie cookie = HiContext.Current.Context.Request.Cookies["Token_" + HiContext.Current.User.UserId.ToString()];
                            if ((cookie != null) && !string.IsNullOrEmpty(cookie.Value))
                            {
                                this.rbtnPaymentMode.Items.Add(new ListItem(info.Name, info.ModeId.ToString()));
                            }
                        }
                        else
                        {
                            this.rbtnPaymentMode.Items.Add(new ListItem(info.Name, info.ModeId.ToString()));
                        }
                    }
                }
                this.rbtnPaymentMode.SelectedIndex = 0;
            }
        }
Esempio n. 3
0
 private void BindPaymentMode()
 {
     System.Collections.Generic.IList <PaymentModeInfo> paymentModes = TradeHelper.GetPaymentModes(PayApplicationType.payOnAll);
     if (paymentModes.Count > 0)
     {
         foreach (PaymentModeInfo current in paymentModes)
         {
             string text = current.Gateway.ToLower();
             if (current.IsUseInpour && !text.Equals("ecdev.plugins.payment.advancerequest") && !text.Equals("ecdev.plugins.payment.bankrequest"))
             {
                 if (text.Equals("ecdev.plugins.payment.alipay_shortcut.shortcutrequest"))
                 {
                     System.Web.HttpCookie httpCookie = HiContext.Current.Context.Request.Cookies["Token_" + HiContext.Current.User.UserId.ToString()];
                     if (httpCookie != null && !string.IsNullOrEmpty(httpCookie.Value))
                     {
                         this.rbtnPaymentMode.Items.Add(new System.Web.UI.WebControls.ListItem(current.Name, current.ModeId.ToString()));
                     }
                 }
                 else
                 {
                     this.rbtnPaymentMode.Items.Add(new System.Web.UI.WebControls.ListItem(current.Name, current.ModeId.ToString()));
                 }
             }
         }
         this.rbtnPaymentMode.SelectedIndex = 0;
     }
 }
Esempio n. 4
0
 protected override void AttachChildControls()
 {
     this.calendarStartDate          = (WebCalendar)this.FindControl("calendarStartDate");
     this.calendarEndDate            = (WebCalendar)this.FindControl("calendarEndDate");
     this.hdorderId                  = (HtmlInputHidden)this.FindControl("hdorderId");
     this.txtOrderId                 = (TextBox)this.FindControl("txtOrderId");
     this.txtShipId                  = (TextBox)this.FindControl("txtShipId");
     this.txtShipTo                  = (TextBox)this.FindControl("txtShipTo");
     this.txtRemark                  = (TextBox)this.FindControl("txtRemark");
     this.txtReturnRemark            = (TextBox)this.FindControl("txtReturnRemark");
     this.txtReplaceRemark           = (TextBox)this.FindControl("txtReplaceRemark");
     this.dropOrderStatus            = (OrderStautsDropDownList)this.FindControl("dropOrderStatus");
     this.dropPayType                = (DropDownList)this.FindControl("dropPayType");
     this.btnPay                     = ButtonManager.Create(this.FindControl("btnPay"));
     this.btnSearch                  = ButtonManager.Create(this.FindControl("btnSearch"));
     this.btnOk                      = ButtonManager.Create(this.FindControl("btnOk"));
     this.btnReturn                  = ButtonManager.Create(this.FindControl("btnReturn"));
     this.btnReplace                 = ButtonManager.Create(this.FindControl("btnReplace"));
     this.litOrderTotal              = (Literal)this.FindControl("litOrderTotal");
     this.dropRefundType             = (DropDownList)this.FindControl("dropRefundType");
     this.dropReturnRefundType       = (DropDownList)this.FindControl("dropReturnRefundType");
     this.listOrders                 = (Common_OrderManage_OrderList)this.FindControl("Common_OrderManage_OrderList");
     this.pager                      = (Pager)this.FindControl("pager");
     this.btnSearch.Click           += new EventHandler(this.lbtnSearch_Click);
     this.btnPay.Click              += new EventHandler(this.btnPay_Click);
     this.btnOk.Click               += new EventHandler(this.btnOk_Click);
     this.btnReturn.Click           += new EventHandler(this.btnReturn_Click);
     this.btnReplace.Click          += new EventHandler(this.btnReplace_Click);
     this.listOrders._ItemDataBound += new Common_OrderManage_OrderList.DataBindEventHandler(this.listOrders_ItemDataBound);
     this.listOrders._ItemCommand   += new Common_OrderManage_OrderList.CommandEventHandler(this.listOrders_ItemCommand);
     this.listOrders._ReBindData    += new Common_OrderManage_OrderList.ReBindDataEventHandler(this.listOrders_ReBindData);
     PageTitle.AddSiteNameTitle("我的订单", HiContext.Current.Context);
     if (!this.Page.IsPostBack)
     {
         this.dropPayType.DataSource     = TradeHelper.GetPaymentModes();
         this.dropPayType.DataTextField  = "Name";
         this.dropPayType.DataValueField = "ModeId";
         this.dropPayType.DataBind();
         this.BindOrders();
     }
 }
Esempio n. 5
0
        protected override void AttachChildControls()
        {
            this.calendarStartDate = (CalendarPanel)this.FindControl("calendarStartDate");
            this.calendarEndDate   = (CalendarPanel)this.FindControl("calendarEndDate");
            this.hdorderId         = (HtmlInputHidden)this.FindControl("hdorderId");
            this.txtOrderId        = (TextBox)this.FindControl("txtOrderId");
            this.txtProductName    = (TextBox)this.FindControl("txtProductName");
            this.txtShipId         = (TextBox)this.FindControl("txtShipId");
            this.txtShipTo         = (TextBox)this.FindControl("txtShipTo");
            this.txtRemark         = (TextBox)this.FindControl("txtRemark");
            this.txtReturnRemark   = (TextBox)this.FindControl("txtReturnRemark");
            this.txtReplaceRemark  = (TextBox)this.FindControl("txtReplaceRemark");
            this.dropOrderStatus   = (OrderStautsDropDownList)this.FindControl("dropOrderStatus");
            this.dropPayType       = (DropDownList)this.FindControl("dropPayType");
            this.btnPay            = ButtonManager.Create(this.FindControl("btnPay"));
            this.imgbtnSearch      = (Button)this.FindControl("imgbtnSearch");
            this.litOrderTotal     = (Literal)this.FindControl("litOrderTotal");
            this.listOrders        = (Common_OrderManage_OrderList)this.FindControl("Common_OrderManage_OrderList");
            this.pager             = (Pager)this.FindControl("pager");
            this.demodiv           = (HtmlGenericControl)this.FindControl("demodiv");
            SiteSettings masterSettings = SettingsManager.GetMasterSettings();

            this.demodiv.Visible           = masterSettings.IsDemoSite;
            this.imgbtnSearch.Click       += this.imgbtnSearch_Click;
            this.btnPay.Click             += this.btnPay_Click;
            this.listOrders.ItemDataBound += this.listOrders_ItemDataBound;
            this.listOrders.ItemCommand   += this.listOrders_ItemCommand;
            PageTitle.AddSiteNameTitle("我的订单");
            if (!this.Page.IsPostBack)
            {
                IList <PaymentModeInfo> paymentModes    = TradeHelper.GetPaymentModes(PayApplicationType.payOnPC);
                PaymentModeInfo         paymentModeInfo = (from p in paymentModes
                                                           where p.Gateway.ToLower() == "hishop.plugins.payment.podrequest"
                                                           select p).FirstOrDefault();
                PaymentModeInfo paymentModeInfo2 = (from p in paymentModes
                                                    where p.Gateway.ToLower() == "hishop.plugins.payment.bankrequest"
                                                    select p).FirstOrDefault();
                if (paymentModeInfo != null)
                {
                    paymentModes.Remove(paymentModeInfo);
                }
                if (paymentModeInfo2 != null)
                {
                    paymentModes.Remove(paymentModeInfo2);
                }
                this.dropPayType.DataSource     = paymentModes;
                this.dropPayType.DataTextField  = "Name";
                this.dropPayType.DataValueField = "ModeId";
                this.dropPayType.DataBind();
                string text = "";
                for (int i = 0; i < this.dropPayType.Items.Count; i++)
                {
                    text = paymentModes[i].Gateway;
                    this.dropPayType.Items[i].Attributes["Gateway"] = text;
                    AttributeCollection attributes = this.dropPayType.Items[i].Attributes;
                    bool flag = TradeHelper.GatewayIsCanBackReturn(text) || text == "hishop.plugins.payment.advancerequest";
                    attributes["IsBackReturn"] = flag.ToString().ToLower();
                }
                this.BindOrders();
            }
        }
Esempio n. 6
0
        protected override void AttachChildControls()
        {
            this.calendarStartDate    = (WebCalendar)this.FindControl("calendarStartDate");
            this.calendarEndDate      = (WebCalendar)this.FindControl("calendarEndDate");
            this.hdorderId            = (System.Web.UI.HtmlControls.HtmlInputHidden) this.FindControl("hdorderId");
            this.txtOrderId           = (System.Web.UI.WebControls.TextBox) this.FindControl("txtOrderId");
            this.txtProductName       = (System.Web.UI.WebControls.TextBox) this.FindControl("txtProductName");
            this.txtShipId            = (System.Web.UI.WebControls.TextBox) this.FindControl("txtShipId");
            this.txtShipTo            = (System.Web.UI.WebControls.TextBox) this.FindControl("txtShipTo");
            this.txtCellPhone         = (System.Web.UI.WebControls.TextBox) this.FindControl("txtCellPhone");
            this.txtRemark            = (System.Web.UI.WebControls.TextBox) this.FindControl("txtRemark");
            this.txtReturnRemark      = (System.Web.UI.WebControls.TextBox) this.FindControl("txtReturnRemark");
            this.txtReplaceRemark     = (System.Web.UI.WebControls.TextBox) this.FindControl("txtReplaceRemark");
            this.dropOrderStatus      = (OrderStautsDropDownList)this.FindControl("dropOrderStatus");
            this.dropPayType          = (System.Web.UI.WebControls.DropDownList) this.FindControl("dropPayType");
            this.btnPay               = ButtonManager.Create(this.FindControl("btnPay"));
            this.imgbtnSearch         = (System.Web.UI.WebControls.ImageButton) this.FindControl("imgbtnSearch");
            this.btnOk                = ButtonManager.Create(this.FindControl("btnOk"));
            this.btnReturn            = ButtonManager.Create(this.FindControl("btnReturn"));
            this.btnReplace           = ButtonManager.Create(this.FindControl("btnReplace"));
            this.litOrderTotal        = (System.Web.UI.WebControls.Literal) this.FindControl("litOrderTotal");
            this.dropRefundType       = (System.Web.UI.WebControls.DropDownList) this.FindControl("dropRefundType");
            this.dropRefundReason     = (System.Web.UI.WebControls.DropDownList) this.FindControl("dropRefundReason");
            this.dropReturnReason     = (System.Web.UI.WebControls.DropDownList) this.FindControl("dropReturnReason");
            this.dropReturnRefundType = (System.Web.UI.WebControls.DropDownList) this.FindControl("dropReturnRefundType");
            this.listOrders           = (Common_OrderManage_OrderList)this.FindControl("Common_OrderManage_OrderList");
            this.pager                = (Pager)this.FindControl("pager");

            this.hlinkAllOrder    = (System.Web.UI.WebControls.HyperLink) this.FindControl("hlinkAllOrder");
            this.hlinkNotPay      = (System.Web.UI.WebControls.HyperLink) this.FindControl("hlinkNotPay");
            this.hlinkNotGetGoods = (System.Web.UI.WebControls.HyperLink) this.FindControl("hlinkNotGetGoods");
            this.hlinkFinished    = (System.Web.UI.WebControls.HyperLink) this.FindControl("hlinkFinished");

            this.hlinkRefund = (System.Web.UI.WebControls.HyperLink) this.FindControl("hlinkRefund");
            this.hlinkReturn = (System.Web.UI.WebControls.HyperLink) this.FindControl("hlinkReturn");

            this.dropLogisticsCompany = (LogisticsCompanyDropDownList)this.FindControl("dropLogisticsCompany");
            this.txtLogisticsId       = (System.Web.UI.WebControls.TextBox) this.FindControl("txtLogisticsId");
            this.quantityList         = (System.Web.UI.HtmlControls.HtmlInputHidden) this.FindControl("quantityList");
            this.skuIds           = (System.Web.UI.HtmlControls.HtmlInputHidden) this.FindControl("skuIds");
            this.LogisticsCompany = (System.Web.UI.HtmlControls.HtmlInputHidden) this.FindControl("LogisticsCompany");
            this.LogisticsId      = (System.Web.UI.HtmlControls.HtmlInputHidden) this.FindControl("LogisticsId");


            this.imgbtnSearch.Click       += new System.Web.UI.ImageClickEventHandler(this.imgbtnSearch_Click);
            this.btnPay.Click             += new System.EventHandler(this.btnPay_Click);
            this.btnOk.Click              += new System.EventHandler(this.btnOk_Click);
            this.btnReturn.Click          += new System.EventHandler(this.btnReturn_Click);
            this.btnReplace.Click         += new System.EventHandler(this.btnReplace_Click);
            this.listOrders.ItemDataBound += new Common_OrderManage_OrderList.DataBindEventHandler(this.listOrders_ItemDataBound);
            this.listOrders.ItemCommand   += new Common_OrderManage_OrderList.CommandEventHandler(this.listOrders_ItemCommand);
            //this.rptOrderProducts = (VshopTemplatedRepeater)this.FindControl("rptOrderProducts");
            //物流选择绑定值
            //IList<string> list = ExpressHelper.GetAllExpressName();
            //List<ListItem> item = new List<ListItem>();
            //foreach (string s in list)
            //{
            //    item.Add(new ListItem(s, s));
            //}
            //dropLogisticsCompany.Items.AddRange(item.ToArray());

            PageTitle.AddSiteNameTitle("我的订单");
            if (!this.Page.IsPostBack)
            {
                this.OrderRefundTime = string.IsNullOrEmpty(System.Configuration.ConfigurationManager.AppSettings["OrderRefunTime"]) ? 30 : int.Parse(System.Configuration.ConfigurationManager.AppSettings["OrderRefunTime"].ToString());
                this.SetOrderStatusLink();
                this.dropPayType.DataSource     = TradeHelper.GetPaymentModes(PayApplicationType.payOnPC);
                this.dropPayType.DataTextField  = "Name";
                this.dropPayType.DataValueField = "ModeId";
                this.dropPayType.DataBind();
                this.BindOrders();
                dropLogisticsCompany.DataBind();
                BindRefundReason();
                BindReturnReason();
            }
            //this.rptOrderProducts.DataSource = ShoppingProcessor.GetOrderItems(orderId);
            //this.rptOrderProducts.DataBind();
        }