public DistributorPaymentRadioButtonList()
 {
     base.Items.Clear();
     foreach (PaymentModeInfo info in SubsiteStoreHelper.GetDistributorPaymentModes())
     {
         if (info.Gateway.ToLower().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.Items.Add(new ListItem(Globals.HtmlDecode(info.Name), info.ModeId.ToString(CultureInfo.InvariantCulture)));
             }
         }
         else
         {
             this.Items.Add(new ListItem(Globals.HtmlDecode(info.Name), info.ModeId.ToString(CultureInfo.InvariantCulture)));
         }
     }
     this.SelectedIndex   = 0;
     this.RepeatDirection = RepeatDirection.Horizontal;
 }
Esempio n. 2
0
 public DistributorPaymentRadioButtonList()
 {
     base.Items.Clear();
     System.Collections.Generic.IList <PaymentModeInfo> distributorPaymentModes = SubsiteStoreHelper.GetDistributorPaymentModes();
     foreach (PaymentModeInfo current in distributorPaymentModes)
     {
         string text = current.Gateway.ToLower();
         if (text.Equals("hishop.plugins.payment.alipay_shortcut.shortcutrequest"))
         {
             System.Web.HttpCookie httpCookie = Hidistro.Membership.Context.HiContext.Current.Context.Request.Cookies["Token_" + Hidistro.Membership.Context.HiContext.Current.User.UserId.ToString()];
             if (httpCookie != null && !string.IsNullOrEmpty(httpCookie.Value))
             {
                 this.Items.Add(new System.Web.UI.WebControls.ListItem(Globals.HtmlDecode(current.Name), current.ModeId.ToString(System.Globalization.CultureInfo.InvariantCulture)));
             }
         }
         else
         {
             this.Items.Add(new System.Web.UI.WebControls.ListItem(Globals.HtmlDecode(current.Name), current.ModeId.ToString(System.Globalization.CultureInfo.InvariantCulture)));
         }
     }
     this.SelectedIndex   = 0;
     this.RepeatDirection = System.Web.UI.WebControls.RepeatDirection.Horizontal;
 }