Пример #1
0
    public static HtmlSelect Combo_Comuna_despacho(System.Web.UI.HtmlControls.HtmlSelect combo, string cod_ciu)
    {
        combo.ID   = "cmbComunasaseg";
        combo.Name = "cmbComunasaseg";

        if (cod_ciu != "0")
        {
            Localidades comu = new Localidades();

            combo.DataSource     = comu.Carga_Comunas_despacho(cod_ciu);
            combo.DataTextField  = "nom_localidad";
            combo.DataValueField = "cod_localidad";
            combo.DataBind();

            if (combo.Items.Count > 1)
            {
                combo = UtilesWeb.Agrega_Seleccionar(combo);
            }
        }
        else
        {
            combo = UtilesWeb.Agrega_Seleccionar(combo);
        }

        return(combo);
    }
Пример #2
0
        private void AddSalesTypeField(HtmlGenericControl container)
        {
            using (HtmlGenericControl salesTypeDiv = HtmlControlHelper.GetField())
            {
                salesTypeDiv.ID = "SalesTypeDiv";
                salesTypeDiv.Attributes.Add("style", "width:200px");

                using (HtmlGenericControl field = HtmlControlHelper.GetField())
                {
                    using (HtmlGenericControl label = HtmlControlHelper.GetLabel(Titles.SalesType, "SalesTypeSelect"))
                    {
                        field.Controls.Add(label);
                    }

                    using (HtmlSelect salesTypeSelect = new HtmlSelect())
                    {
                        salesTypeSelect.ID = "SalesTypeSelect";
                        salesTypeSelect.DataSource = this.GetSalesTypes();
                        salesTypeSelect.DataTextField = "Text";
                        salesTypeSelect.DataValueField = "Value";
                        salesTypeSelect.DataBind();

                        field.Controls.Add(salesTypeSelect);
                    }

                    salesTypeDiv.Controls.Add(field);
                }

                container.Controls.Add(salesTypeDiv);
            }
        }
Пример #3
0
    public static System.Web.UI.HtmlControls.HtmlSelect Agrega_Stylo(System.Web.UI.HtmlControls.HtmlSelect cmb, string nom_css, string width)
    {
        cmb.Style["WIDTH"] = width;
        cmb.Attributes.Add("class", nom_css);

        return(cmb);
    }
Пример #4
0
    public static System.Web.UI.HtmlControls.HtmlSelect Agrega_Stylo(System.Web.UI.HtmlControls.HtmlSelect cmb)
    {
        cmb.Style["WIDTH"] = "180";
        cmb.Attributes.Add("class", "textbox2");

        return(cmb);
    }
Пример #5
0
        private void AddSourceStoreSelect(HtmlGenericControl fields)
        {
            if (!this.DisplaySourceStore)
            {
                return;
            }

            using (HtmlGenericControl field = FormHelper.GetField())
            {
                using (HtmlGenericControl label = new HtmlGenericControl())
                {
                    label.TagName = "label";
                    label.Attributes.Add("for", "SourceStoreSelect");
                    label.InnerText = Titles.DeliverFrom;
                    field.Controls.Add(label);
                }

                using (HtmlSelect sourceStoreSelect = new HtmlSelect())
                {
                    sourceStoreSelect.ID = "SourceStoreSelect";

                    field.Controls.Add(sourceStoreSelect);
                }

                fields.Controls.Add(field);
            }
        }
 public void InitControl(DataTable tb, DataTable hdrtb, System.Web.UI.HtmlControls.HtmlSelect pref)
 {
     PrefList = pref;
     grTable  = tb;
     hdrTable = hdrtb;
     DoDataBind();
 }
Пример #7
0
        public static void SetDropDownList(DataTable dataTable, System.Web.UI.HtmlControls.HtmlSelect htmlSelect, string selectedValue, DropDownFlag flag)
        {
            htmlSelect.Items.Clear();

            if (flag == DropDownFlag.All)
            {
                htmlSelect.Items.Add(new ListItem("전체선택", "0"));
            }
            else if (flag == DropDownFlag.Select)
            {
                htmlSelect.Items.Add(new ListItem("선택하세요", "-1"));
            }

            for (int iRowCnt = 0; iRowCnt < dataTable.Rows.Count; iRowCnt++)
            {
                htmlSelect.Items.Add(new ListItem(dataTable.Rows[iRowCnt][1].ToString(), dataTable.Rows[iRowCnt][0].ToString()));
                if (dataTable.Rows[iRowCnt][1].ToString() == selectedValue)
                {
                    if (flag == DropDownFlag.None)
                    {
                        htmlSelect.SelectedIndex = iRowCnt;
                    }
                    else
                    {
                        htmlSelect.SelectedIndex = iRowCnt + 1;
                    }
                }
            }
        }
Пример #8
0
 public static void AddListItemsToSelect(System.Web.UI.HtmlControls.HtmlSelect SelectDDlID, DataTable Dt, string textValue, string IDvalue)
 {
     SelectDDlID.Items.Add(new ListItem("All", "0"));
     for (int i = 0; i < Dt.Rows.Count; i++)
     {
         SelectDDlID.Items.Add(new ListItem(Dt.Rows[i][textValue].ToString(), Dt.Rows[i][IDvalue].ToString()));
     }
 }
Пример #9
0
 //允许显示的菜单栏目
 private void CreateRightAccount(HtmlSelect listcontrolright, int TopMenuId)
 {
     Johnny.CMS.BLL.SystemInfo.TopMenuBinding bll = new Johnny.CMS.BLL.SystemInfo.TopMenuBinding();
     listcontrolright.DataSource = bll.GetList(TopMenuId);
     listcontrolright.DataTextField = "MenuCategoryName";
     listcontrolright.DataValueField = "MenuCategoryId";
     listcontrolright.DataBind();
 }
Пример #10
0
 //拥有权限
 private void CreateRightAccount(HtmlSelect listcontrolright, int TopMenuId)
 {
     Johnny.CMS.BLL.Access.RolePermission bll = new Johnny.CMS.BLL.Access.RolePermission();
     listcontrolright.DataSource = bll.GetList(RoleId, PermissionCategoryId);
     listcontrolright.DataTextField = "PermissionName";
     listcontrolright.DataValueField = "PermissionId";
     listcontrolright.DataBind();
 }
Пример #11
0
 protected void lvAZSubjectSeriesLinks_ItemDataBound(object sender, ListViewItemEventArgs e)
 {
     if (RenewalListView.EditIndex == (e.Item as ListViewDataItem).DataItemIndex)
     {
         System.Web.UI.HtmlControls.HtmlSelect SeriesId = (System.Web.UI.HtmlControls.HtmlSelect)e.Item.FindControl("type");
         string title = ((TextBox)e.Item.FindControl("TextBox1")).Text;
         SeriesId.Value = title;
     }
 }
Пример #12
0
        protected void BindDdlPwdQuestion(System.Web.UI.HtmlControls.HtmlSelect ddl_PwdQuestion)
        {
            BLL.Sys_SecurityQuestion BLL = new BLL.Sys_SecurityQuestion();
            string whereStr = " IsDeleted=0 and Status=1";
            IList <Model.Sys_SecurityQuestion> list = BLL.GetList(whereStr);

            ddl_PwdQuestion.DataSource     = list;
            ddl_PwdQuestion.DataTextField  = "Question";
            ddl_PwdQuestion.DataValueField = "ID";
            ddl_PwdQuestion.DataBind();
        }
Пример #13
0
    private void LoadHuyen(string idTinh, System.Web.UI.HtmlControls.HtmlSelect sl, string idHuyen)
    {
        string strSql = "select * from tb_Huyen where idTinh='" + idTinh + "'";

        sl.DataSource     = Connect.GetTable(strSql);
        sl.DataTextField  = "TenHuyen";
        sl.DataValueField = "idHuyen";
        sl.DataBind();
        sl.Items.Add(new ListItem("Chọn Quận/Huyện", "0"));
        sl.Items.FindByValue(idHuyen).Selected = true;
    }
Пример #14
0
 public static void bindSelect(System.Web.UI.HtmlControls.HtmlSelect select, DataTable dt, string value, string text, string add)
 {
     select.DataSource     = dt;
     select.DataValueField = value;
     select.DataTextField  = text;
     select.DataBind();
     if (add != "")
     {
         select.Items.Insert(0, new ListItem(add, "--"));
     }
 }
Пример #15
0
 private void InitMoneyType(System.Web.UI.HtmlControls.HtmlSelect pm_sltControl)
 {
     BLL.PageFacade.LoadDictionarySelect(pm_sltControl, "币种", "");
     foreach (ListItem ud_Item in pm_sltControl.Items)
     {
         if (ud_Item.Value.IndexOf("人民币") >= 0)
         {
             pm_sltControl.Items.Remove(ud_Item);
             break;
         }
     }
 }
Пример #16
0
 protected override void AttachChildControls()
 {
     this.txtOrderId          = (System.Web.UI.HtmlControls.HtmlInputText) this.FindControl("txtOrderId");
     this.imgbtnSearch        = (System.Web.UI.WebControls.ImageButton) this.FindControl("imgbtnSearch");
     this.RefundList          = (Common_OrderManage_RefundApply)this.FindControl("Common_OrderManage_RefundApply");
     this.handleStatus        = (System.Web.UI.HtmlControls.HtmlSelect) this.FindControl("handleStatus");
     this.pager               = (Pager)this.FindControl("pager");
     this.imgbtnSearch.Click += new System.Web.UI.ImageClickEventHandler(this.imgbtnSearch_Click);
     if (!this.Page.IsPostBack)
     {
         this.BindRefund();
     }
 }
Пример #17
0
 /// <summary>
 /// 用时间填充HtmlSelect
 /// </summary>
 /// <param name="ddl"></param>
 /// <param name="selectedIndex"></param>
 public static void FillTimeOptions(HtmlSelect ddl, int selectedIndex)
 {
     ddl.Items.Clear();
     for (int i = 0; i < 24; i++)
     {
         ListItem li = new ListItem(i.ToString().PadLeft(2, '0'));
         if (i == selectedIndex)
         {
             li.Selected = true;
         }
         ddl.Items.Add(li);
     }
 }
Пример #18
0
        private static void AddStoreSelectCell(HtmlTableRow row)
        {
            using (HtmlTableCell cell = Helpers.TableHelper.GetFieldCell())
            {
                using (HtmlSelect storeSelect = new HtmlSelect())
                {
                    storeSelect.ID = "StoreSelect";
                    cell.Controls.Add(storeSelect);
                }

                row.Cells.Add(cell);
            }
        }
Пример #19
0
        private static void AddPriceTypeSelectCell(HtmlTableRow row)
        {
            using (HtmlTableCell cell = Helpers.TableHelper.GetFieldCell())
            {
                using (HtmlSelect priceTypeSelect = new HtmlSelect())
                {
                    priceTypeSelect.ID = "PriceTypeSelect";
                    cell.Controls.Add(priceTypeSelect);
                }

                row.Cells.Add(cell);
            }
        }
Пример #20
0
        public static void SetDropDownListByText(DataTable dataTable, System.Web.UI.HtmlControls.HtmlSelect htmlSelect, string displayText, string displayCode, string selectedText)
        {
            htmlSelect.Items.Clear();

            for (int iRowCnt = 0; iRowCnt < dataTable.Rows.Count; iRowCnt++)
            {
                htmlSelect.Items.Add(new ListItem(dataTable.Rows[iRowCnt][1].ToString(), dataTable.Rows[iRowCnt][0].ToString()));
                if (dataTable.Rows[iRowCnt][1].ToString() == selectedText)
                {
                    htmlSelect.SelectedIndex = iRowCnt;
                }
            }
        }
Пример #21
0
        private static void CreateItemField(TableRow row)
        {
            using (TableCell cell = new TableCell())
            {
                using (HtmlSelect itemSelect = new HtmlSelect())
                {
                    itemSelect.ID = "ItemSelect";
                    itemSelect.Attributes.Add("title", "Ctrl + I");
                    cell.Controls.Add(itemSelect);
                }

                row.Cells.Add(cell);
            }
        }
Пример #22
0
        private static void AddPartySelectCell(HtmlTableRow row)
        {
            using (HtmlTableCell cell = Helpers.TableHelper.GetFieldCell())
            {
                using (HtmlSelect partySelect = new HtmlSelect())
                {
                    partySelect.ID = "PartySelect";
                    partySelect.Attributes.Add("title", "F2");

                    cell.Controls.Add(partySelect);
                }
                row.Cells.Add(cell);
            }
        }
Пример #23
0
        private void AddItemSelect(TableRow row)
        {
            using (TableCell cell = this.GetCell())
            {
                using (HtmlSelect itemSelect = new HtmlSelect())
                {
                    itemSelect.ID = "ItemSelect";

                    cell.Controls.Add(itemSelect);
                }

                row.Controls.Add(cell);
            }
        }
Пример #24
0
        private void AddStoreSelect(TableRow row)
        {
            using (TableCell cell = this.GetCell())
            {
                using (HtmlSelect storeSelect = new HtmlSelect())
                {
                    storeSelect.ID = "StoreSelect";

                    cell.Controls.Add(storeSelect);
                }

                row.Controls.Add(cell);
            }
        }
Пример #25
0
 /// <summary>
 /// 为DropDownList下拉框添加值
 /// </summary>
 /// <param name="select">下拉框控件的Id名称</param>
 /// <param name="ds">待添加的数据集</param>
 /// <param name="name">负值给下拉框内容的字段</param>
 /// <param name="value">负值给下拉框Value值的字段</param>
 public static void SelectItemsAddLevel(HtmlSelect select, DataSet ds, string name, string value)
 {
     foreach (DataRow row in ds.Tables[0].Rows)
     {
         int level = (int)row["level"];
         string levelStr = " ├";
         if (level > 1)
         {
             for (int i = 1; i < level; i++)
                 levelStr = " │" + levelStr;
         }
         select.Items.Add(new ListItem(levelStr + row[name].ToString(), row[value].ToString()));
     }
 }
Пример #26
0
        private static void CreateUnitField(TableRow row)
        {
            using (TableCell cell = new TableCell())
            {
                using (HtmlSelect unitSelect = new HtmlSelect())
                {
                    unitSelect.ID = "UnitSelect";
                    unitSelect.Attributes.Add("title", "Ctrl + U");
                    cell.Controls.Add(unitSelect);
                }

                row.Cells.Add(cell);
            }
        }
Пример #27
0
        private static void CreateTaxFormField(TableRow row)
        {
            using (TableCell cell = new TableCell())
            {
                using (HtmlSelect taxSelect = new HtmlSelect())
                {
                    taxSelect.ID = "TaxSelect";
                    taxSelect.Attributes.Add("title", "Ctrl + T");
                    cell.Controls.Add(taxSelect);
                }

                row.Cells.Add(cell);
            }
        }
Пример #28
0
        public static void EnableDisableCtrlEnum(bool enabled, IEnumerable ctrls)
        {
            System.Web.UI.WebControls.TextBox     txt = null;
            System.Web.UI.HtmlControls.HtmlSelect cmb = null;
            System.Web.UI.HtmlControls.HtmlButton btn = null;

            if (!enabled) //Disable
            {
                foreach (var ctrl in ctrls)
                {
                    if (ctrl is System.Web.UI.WebControls.TextBox)
                    {
                        txt = (System.Web.UI.WebControls.TextBox)ctrl;
                        //AddAttributeWeb("readonly", "true", txt);
                        txt.ReadOnly = true;
                    }
                    else if (ctrl is System.Web.UI.HtmlControls.HtmlSelect)
                    {
                        cmb = (System.Web.UI.HtmlControls.HtmlSelect)ctrl;
                        //AddAttribute("disabled", "true", cmb);
                        cmb.Disabled = true;
                    }
                    else if (ctrl is System.Web.UI.HtmlControls.HtmlButton)
                    {
                        btn = (System.Web.UI.HtmlControls.HtmlButton)ctrl;
                        //AddAttribute("disabled", "true", cmb);
                        btn.Disabled = true;
                    }
                }
            }
            else //Enable
            {
                foreach (var ctrl in ctrls)
                {
                    if (ctrl is System.Web.UI.WebControls.TextBox)
                    {
                        txt          = (System.Web.UI.WebControls.TextBox)ctrl;
                        txt.ReadOnly = false;
                        txt.Enabled  = true;
                    }
                    else if (ctrl is System.Web.UI.HtmlControls.HtmlSelect)
                    {
                        cmb = (System.Web.UI.HtmlControls.HtmlSelect)ctrl;
                        RemoveAttribute("disabled", cmb);
                        cmb.Disabled = false;
                    }
                }
            }
        }
Пример #29
0
        public static void SetDefaultSettingHtmlSelect(DataTable dataTable, System.Web.UI.HtmlControls.HtmlSelect htmlSelect, string selectedValue, string DefaultTxt, string DefaultValue)
        {
            htmlSelect.Items.Clear();

            htmlSelect.Items.Add(new ListItem(DefaultTxt, DefaultValue));
            for (int iRowCnt = 0; iRowCnt < dataTable.Rows.Count; iRowCnt++)
            {
                htmlSelect.Items.Add(new ListItem(dataTable.Rows[iRowCnt][1].ToString(), dataTable.Rows[iRowCnt][0].ToString()));

                if (dataTable.Rows[iRowCnt][0].ToString().Equals(selectedValue))
                {
                    htmlSelect.Value = selectedValue;
                }
            }
        }
Пример #30
0
        private void dgExchangeRateList_ItemDataBound(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e)
        {
            switch (e.Item.ItemType)
            {
            case ListItemType.Item:
            case ListItemType.AlternatingItem:
                System.Web.UI.HtmlControls.HtmlSelect ud_sltControl = (System.Web.UI.HtmlControls.HtmlSelect)e.Item.FindControl("sltMoneyType");

                InitMoneyType(ud_sltControl);
                break;

            default:
                break;
            }
        }
Пример #31
0
        private void AddPaymentTermSelectCell(HtmlTableRow row)
        {
            using (HtmlTableCell cell = Helpers.TableHelper.GetFieldCell())
            {
                if (this.ShowPaymentTerms)
                {
                    using (HtmlSelect paymentTermSelect = new HtmlSelect())
                    {
                        paymentTermSelect.ID = "PaymentTermSelect";
                        cell.Controls.Add(paymentTermSelect);
                    }
                }

                row.Cells.Add(cell);
            }
        }
Пример #32
0
 protected void repeater1_ItemDataBound(object sender, RepeaterItemEventArgs e)
 {
     if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
     {
         System.Web.UI.HtmlControls.HtmlSelect select = (e.Item.FindControl("selectOperation") as System.Web.UI.HtmlControls.HtmlSelect);
         select.Value = ((DataRowView)e.Item.DataItem).Row["OperationSign"].ToString();
         System.Web.UI.HtmlControls.HtmlGenericControl span = (System.Web.UI.HtmlControls.HtmlGenericControl)(e.Item.FindControl("remark"));
         if (jobType == "SL")
         {
             span.InnerText = "(产品类型:" + ((DataRowView)e.Item.DataItem).Row["ProductType"].ToString() + ",产品数量:" + ((DataRowView)e.Item.DataItem).Row["Num"].ToString() + ")";
         }
         else
         {
             span.InnerText = "(持卡人姓名:" + ((DataRowView)e.Item.DataItem).Row["CardholderName"].ToString() + ")";
         }
     }
 }
Пример #33
0
 protected override void AttachChildControls()
 {
     this.coupons            = (Common_Coupon_CouponList)this.FindControl("Common_Coupons_CouponsList");
     this.txtCoupon          = (System.Web.UI.WebControls.TextBox) this.FindControl("txtCoupon");
     this.status             = (SmallStatusMessage)this.FindControl("status");
     this.btnAddCoupon       = ButtonManager.Create(this.FindControl("btnAddCoupon"));
     this.selectCouponStatus = (System.Web.UI.HtmlControls.HtmlSelect) this.FindControl("selectCouponStatus");
     this.imgbtnSearch       = (System.Web.UI.WebControls.ImageButton) this.FindControl("imgbtnSearch");
     this.pager = (Pager)this.FindControl("pager");
     this.btnAddCoupon.Click += new System.EventHandler(this.btnAddCoupon_Click);
     this.imgbtnSearch.Click += new System.Web.UI.ImageClickEventHandler(this.imgbtnSearch_Click);
     new System.Web.UI.WebControls.HyperLink();
     if (!this.Page.IsPostBack)
     {
         this.BindCoupons();
     }
 }
Пример #34
0
        protected override void CreateChildControls()
        {
            this.txtUserInput = new TextBox();
            this.btnCombo     = new HtmlButton();
            this.btnCombo.Attributes.Add("tabIndex", "-1");
            Literal beginNoBreak = new Literal();

            beginNoBreak.Text = "<nobr>";
            Literal endNoBreak = new Literal();

            endNoBreak.Text = "</nobr>";
            this.Controls.Add(beginNoBreak);
            this.Controls.Add(this.txtUserInput);
            this.Controls.Add(this.btnCombo);
            this.Controls.Add(endNoBreak);
            this.divMain = new HtmlGenericControl("div");
            this.Controls.Add(this.divMain);
            //divWrapper = new HtmlGenericControl("div");
            //this.Controls.Add(this.divWrapper);
            //divWrapper.Attributes.Add("style", "clear:left;");
            //divWrapper.Controls.Add(this.divMain);
            this.ddSmartDropdown    = new HtmlSelect();
            this.ddSmartDropdown.ID = this.ddSmartDropdown.ClientID;
            this.divMain.ID         = this.divMain.ClientID;
            this.divMain.Controls.Add(this.ddSmartDropdown);
            this.divMain.Attributes.Add("name", this.divMain.ClientID);
            this.ddSmartDropdown.Attributes.Add("tabIndex", "-1");
            this.ddSmartDropdown.Attributes.Add("size", "10");
            this.ddSmartDropdown.Attributes.Add("name", this.ddSmartDropdown.ID);
            Literal spacer = new Literal();

            spacer.Text = "&nbsp;&nbsp;";
            this.Controls.Add(spacer);
            this.lblValueLabel    = new Label();
            this.lblValueLabel.ID = this.lblValueLabel.ClientID;
            this.Controls.Add(this.lblValueLabel);
            Literal singleSpace = new Literal();

            singleSpace.Text = "&nbsp;";
            this.Controls.Add(singleSpace);
            this.txtValue = new TextBox();
            this.Controls.Add(this.txtValue);
            this.txtValue.ID = this.txtValue.ClientID;
            this.txtValue.Attributes.Add("tabIndex", "-1");
            this.txtValue.Attributes.Add("onfocus", "this.blur();");
        }
Пример #35
0
        private static void AddShippingCompanyField(HtmlGenericControl container)
        {
            using (HtmlGenericControl field = HtmlControlHelper.GetField())
            {
                using (HtmlGenericControl label = HtmlControlHelper.GetLabel(Titles.ShippingCompany, "ShippingCompanySelect"))
                {
                    field.Controls.Add(label);
                }
                using (HtmlSelect shippingCompanySelect = new HtmlSelect())
                {
                    shippingCompanySelect.ID = "ShippingCompanySelect";
                    field.Controls.Add(shippingCompanySelect);
                }

                container.Controls.Add(field);
            }
        }
Пример #36
0
        private static void AddPriceTypeSelectField(HtmlGenericControl container)
        {
            using (HtmlGenericControl field = HtmlControlHelper.GetField())
            {
                using (HtmlGenericControl label = HtmlControlHelper.GetLabel(Titles.PriceType))
                {
                    field.Controls.Add(label);
                }

                using (HtmlSelect priceTypeSelect = new HtmlSelect())
                {
                    priceTypeSelect.ID = "PriceTypeSelect";
                    field.Controls.Add(priceTypeSelect);
                }

                container.Controls.Add(field);
            }
        }
Пример #37
0
        private static void AddStoreSelectField(HtmlGenericControl container)
        {
            using (HtmlGenericControl field = HtmlControlHelper.GetField())
            {
                using (HtmlGenericControl label = HtmlControlHelper.GetLabel(Titles.SelectStore))
                {
                    field.Controls.Add(label);
                }

                using (HtmlSelect storeSelect = new HtmlSelect())
                {
                    storeSelect.ID = "StoreSelect";
                    field.Controls.Add(storeSelect);
                }

                container.Controls.Add(field);
            }
        }
Пример #38
0
        private void AddPaymentTermSelectField(HtmlGenericControl container)
        {
            using (HtmlGenericControl field = HtmlControlHelper.GetField())
            {
                using (HtmlGenericControl label = HtmlControlHelper.GetLabel("&nbsp;"))
                {
                    field.Controls.Add(label);
                }

                using (HtmlSelect paymentTermSelect = new HtmlSelect())
                {
                    paymentTermSelect.ID = "PaymentTermSelect";
                    field.Controls.Add(paymentTermSelect);
                }

                container.Controls.Add(field);
            }
        }
Пример #39
0
        private static void AddSalespersonField(HtmlGenericControl container)
        {
            using (HtmlGenericControl salespersonDiv = HtmlControlHelper.GetField())
            {
                salespersonDiv.ID = "SalespersonDiv";

                using (HtmlGenericControl label = HtmlControlHelper.GetLabel(Titles.Salesperson, "SalesPersonSelect"))
                {
                    salespersonDiv.Controls.Add(label);
                }

                using (HtmlSelect salesPersonSelect = new HtmlSelect())
                {
                    salesPersonSelect.ID = "SalesPersonSelect";
                    salespersonDiv.Controls.Add(salesPersonSelect);
                }

                container.Controls.Add(salespersonDiv);
            }
        }
Пример #40
0
        private static void AddCostCenterField(HtmlGenericControl container)
        {
            using (HtmlGenericControl costCenterDiv = HtmlControlHelper.GetField())
            {
                costCenterDiv.ID = "CostCenterDiv";

                using (HtmlGenericControl label = HtmlControlHelper.GetLabel(Titles.CostCenter, "CostCenterSelect"))
                {
                    costCenterDiv.Controls.Add(label);
                }

                using (HtmlSelect costCenterSelect = new HtmlSelect())
                {
                    costCenterSelect.ID = "CostCenterSelect";
                    costCenterDiv.Controls.Add(costCenterSelect);
                }

                container.Controls.Add(costCenterDiv);
            }
        }
Пример #41
0
        private static void AddPartySelectField(HtmlGenericControl container)
        {
            using (HtmlGenericControl field = HtmlControlHelper.GetField())
            {
                using (HtmlGenericControl label = HtmlControlHelper.GetLabel("&nbsp;"))
                {
                    field.Controls.Add(label);
                }

                using (HtmlSelect partySelect = new HtmlSelect())
                {
                    partySelect.ID = "PartySelect";
                    partySelect.Attributes.Add("title", "F2");

                    field.Controls.Add(partySelect);
                }

                container.Controls.Add(field);
            }
        }
Пример #42
0
        protected virtual void Dispose(bool disposing)
        {
            if (!disposing)
            {
                return;
            }

            if (this.branchSelect != null)
            {
                this.branchSelect.Dispose();
                this.branchSelect = null;
            }

            if (this.companySelect != null)
            {
                this.companySelect.Dispose();
                this.companySelect = null;
            }

            this.disposed = true;
        }
Пример #43
0
    /// <summary>
    /// Request Object Form Value
    /// </summary>
    /// <param name="FormObject">WebControls, HtmlControls</param>
    /// <param name="sDefaultValue"></param>
    /// <returns>String</returns>
    public static string rf(object FormObject, string sDefaultValue = null)
    {
        string sRet = sDefaultValue;

        if (FormObject != null)
        {
            try
            {
                TextBox obj = (TextBox)FormObject;
                sRet = obj.Text;
            }
            catch { }
            finally { }
            try
            {
                System.Web.UI.HtmlControls.HtmlInputText obj = (System.Web.UI.HtmlControls.HtmlInputText)FormObject;
                sRet = obj.Value;
            }
            catch { }
            try
            {
                System.Web.UI.HtmlControls.HtmlInputHidden obj = (System.Web.UI.HtmlControls.HtmlInputHidden)FormObject;
                sRet = obj.Value;
            }
            catch { }
            try
            {
                System.Web.UI.HtmlControls.HtmlTextArea obj = (System.Web.UI.HtmlControls.HtmlTextArea)FormObject;
                sRet = obj.InnerText;
            }
            catch { }
            try
            {
                DropDownList obj = (DropDownList)FormObject;
                sRet = obj.SelectedItem.Value;
            }
            catch { }
            try
            {
                System.Web.UI.HtmlControls.HtmlSelect obj = (System.Web.UI.HtmlControls.HtmlSelect)FormObject;
                sRet = obj.Value;
            }
            catch { }
            try
            {
                RadioButtonList obj = (RadioButtonList)FormObject;
                sRet = obj.SelectedItem.Value;
            }
            catch { }
            try
            {
                System.Web.UI.HtmlControls.HtmlInputCheckBox obj = (System.Web.UI.HtmlControls.HtmlInputCheckBox)FormObject;
                sRet = obj.Value;
            }
            catch { }
            try
            {
                System.Web.UI.HtmlControls.HtmlInputRadioButton obj = (System.Web.UI.HtmlControls.HtmlInputRadioButton)FormObject;
                sRet = obj.Value;
            }
            catch { }
        }
        return(sRet);
    }
Пример #44
0
 protected override void SetValueByquery(HtmlSelect control, string query)
 {
     if (XYECOM.Core.XYRequest.GetQueryString(query) != "")
         control.Value = XYECOM.Core.XYRequest.GetQueryString(query);
 }
Пример #45
0
        protected override void AddContent()
        {
            Control content = AddDiv(Body, null);
            content.ID = "Content";
            
            if (ServiceClass.Description.Length > 0)
                AddGeneric(content, "span", "service-help", ServiceClass.Description);

            Control form = AddGeneric(content, "form");
            form.ID = "TestForm";
    
            Control selectionPara = AddPara(form, null, "Select method to test: ");
    
            HtmlSelect methodSelector = new HtmlSelect();
            methodSelector.ID = "Method";
            methodSelector.Attributes.Add("onchange", "return Method_onchange(this)");

            foreach (JsonRpcMethod method in SortedMethods)
                methodSelector.Items.Add(method.Name);
    
            selectionPara.Controls.Add(methodSelector);

            HtmlInputButton testButton = new HtmlInputButton();
            testButton.ID = "Test";
            testButton.Value = "Test";
            testButton.Attributes["onclick"] = "return Test_onclick(this)";
            testButton.Attributes["accesskey"] = "T";
            selectionPara.Controls.Add(new LiteralControl(" "));
            selectionPara.Controls.Add(testButton);

            selectionPara.Controls.Add(new LiteralControl(" "));

            HyperLink helpLink = new HyperLink();
            helpLink.Text = "Help";
            helpLink.NavigateUrl = Request.FilePath + "?help";
            selectionPara.Controls.Add(helpLink);

            Control requestPara = AddPara(form, null, "Request parameters: ");

            HtmlTextArea requestArea = new HtmlTextArea();
            requestArea.ID = "Request";
            requestArea.Rows = 10;
            requestArea.Attributes.Add("title", "Enter the array of parameters (in JSON) to send in the RPC request.");
            requestPara.Controls.Add(requestArea);
        
            Control responsePara = AddPara(form, null, "Response result/error: ");

            HtmlTextArea responseArea = new HtmlTextArea();
            responseArea.ID = "Response";
            responseArea.Rows = 10;
            responseArea.Attributes.Add("readonly", "readonly");
            responseArea.Attributes.Add("title", "The result or error object (in JSON) from the last RPC response.");
            responsePara.Controls.Add(responseArea);

            Control statsPara = AddPara(content, null, null);
            statsPara.ID = "Stats";

            Control headersPre = AddGeneric(content, "pre");
            headersPre.ID = "Headers";

            AddScriptInclude((Request.ApplicationPath.Equals("/") ? 
                string.Empty : Request.ApplicationPath) + "/json.js");

            AddScriptBlock(@"
                var callTemplates = " + BuildCallTemplatesObject() + @";
                var theForm = null;
                var nextRequestId = 0;

                Number.prototype.formatWhole = function()
                {
                    var s = this.toFixed(0).toString();
                    var groups = [];
                    while (s.length > 0)
                    {
                        groups.unshift(s.slice(-3));
                        s = s.slice(0, -3);
                    }
                    return groups.join();
                }

                window.onload = function() 
                { 
                    theForm = document.forms[0]; 
                    Method_onchange(theForm.Method); 
                }

                function Method_onchange(sender)
                {
                    theForm.Request.value = callTemplates[sender.options[sender.selectedIndex].value];
                }

                function Test_onclick(sender)
                {
                    var stats = document.getElementById('Stats');
                    setText(stats, null);

                    var headers = document.getElementById('Headers');
                    setText(headers, null);

                    var form = theForm;

                    try
                    {
                        var request = { 
                            id : ++nextRequestId, 
                            method : form.Method.value, 
                            params : JSON.parse(theForm.Request.value) };
                        
                        form.Response.value = '';
                        form.Response.className = '';
                        var response = callSync(request);
                        setText(stats, 'Time taken = ' + (response.timeTaken / 1000).toFixed(4) + ' milliseconds; Response size = ' + response.http.text.length.formatWhole() + ' char(s)');
                        setText(headers, response.http.headers);
                        if (response.error != null) throw response.error;
                        form.Response.value = JSON.stringify(response.result);
                    }
                    catch (e)
                    {
                        form.Response.className = 'error';
                        form.Response.value = JSON.stringify(e);
                        alert(e.message);
                    }
                }

                function callSync(request)
                {
                    var http = window.ActiveXObject ? 
                        new ActiveXObject('Microsoft.XMLHTTP') :
                        new XMLHttpRequest();
                    http.open('POST', '" + Request.FilePath + @"', false);
                    http.setRequestHeader('Content-Type', 'text/plain; charset=utf-8');
                    http.setRequestHeader('X-JSON-RPC', request.method);
                    http.send(JSON.stringify(request));
                    if (http.status != 200)
                        throw { message : http.status + ' ' + http.statusText, toString : function() { return this.message; } };
                    var clockStart = new Date();
                    var response = JSON.eval(http.responseText);
                    response.timeTaken = (new Date()) - clockStart;
                    response.http = { text : http.responseText, headers : http.getAllResponseHeaders() };
                    return response;
                }

                function setText(e, text)
                {
                    while (e.firstChild)
                        e.removeChild(e.firstChild);

                    if (text == null) 
                        return;

                    text = text.toString();

                    if (0 === text.length) 
                        return;

                    var textNode = document.createTextNode(text);
                    e.appendChild(textNode);
                }
                ");

            base.AddContent();
        }
Пример #46
0
        private void AddSelectControlCell(TableRow row, string controlId)
        {
            using (TableCell cell = new TableCell())
            {
                using (HtmlSelect targetControl = new HtmlSelect())
                {
                    targetControl.ID = controlId;

                    cell.Controls.Add(targetControl);
                }

                row.Controls.Add(cell);
            }
        }
Пример #47
0
        private void Dispose(bool disposing)
        {
            if (!disposing)
            {
                return;
            }

            if (this.accountOverviewTab != null)
            {
                this.accountOverviewTab.Dispose();
                this.accountOverviewTab = null;
            }

            if (this.headerLiteral != null)
            {
                this.headerLiteral.Dispose();
                this.headerLiteral = null;
            }

            if (this.itemCodeInputText != null)
            {
                this.itemCodeInputText.Dispose();
                this.itemCodeInputText = null;
            }

            if (this.itemSelect != null)
            {
                this.itemSelect.Dispose();
                this.itemSelect = null;
            }

            if (this.storeSelect != null)
            {
                this.storeSelect.Dispose();
                this.storeSelect = null;
            }

            if (this.selectedValuesHidden != null)
            {
                this.selectedValuesHidden.Dispose();
                this.selectedValuesHidden = null;
            }

            if (this.showButton != null)
            {
                this.showButton.Dispose();
                this.showButton = null;
            }

            if (this.statementGridView != null)
            {
                this.statementGridView.Dispose();
                this.statementGridView = null;
            }

            if (this.toDateTextBox != null)
            {
                this.toDateTextBox.Dispose();
                this.toDateTextBox = null;
            }

            this.disposed = true;
        }
Пример #48
0
        protected override void AttachChildControls()
        {
            DistributorsInfo nowCurrentDistributors = DistributorsBrower.GetNowCurrentDistributors(Globals.GetCurrentMemberUserId());
            MemberInfo       currentMember          = MemberProcessor.GetCurrentMember();

            if (nowCurrentDistributors.ReferralStatus != 0)
            {
                System.Web.HttpContext.Current.Response.Redirect("MemberCenter.aspx");
            }
            else
            {
                PageTitle.AddSiteNameTitle("申请提现");
                this.accoutType  = (System.Web.UI.HtmlControls.HtmlSelect) this.FindControl("accoutType");
                this.litmaxmoney = (System.Web.UI.WebControls.Literal) this.FindControl("litmaxmoney");
                SiteSettings masterSettings = SettingsManager.GetMasterSettings(true);
                if (masterSettings.DrawPayType.Contains("0"))
                {
                    this.accoutType.Items.Add(new System.Web.UI.WebControls.ListItem("微信钱包", "0"));
                }
                if (masterSettings.DrawPayType.Contains("1"))
                {
                    this.accoutType.Items.Add(new System.Web.UI.WebControls.ListItem("支付宝", "1"));
                }
                if (masterSettings.DrawPayType.Contains("2"))
                {
                    this.accoutType.Items.Add(new System.Web.UI.WebControls.ListItem("线下转帐", "2"));
                }
                System.Web.UI.WebControls.Literal literal = (System.Web.UI.WebControls.Literal) this.FindControl("litAlipayBtn");
                literal.Text = "display:none";
                if (masterSettings.DrawPayType.Contains("3"))
                {
                    literal.Text = "";
                }
                this.txtAccountName       = (System.Web.UI.HtmlControls.HtmlInputText) this.FindControl("txtAccountName");
                this.txtaccount           = (System.Web.UI.HtmlControls.HtmlInputText) this.FindControl("txtaccount");
                this.txtmoney             = (System.Web.UI.HtmlControls.HtmlInputText) this.FindControl("txtmoney");
                this.txtmoneyweixin       = (System.Web.UI.HtmlControls.HtmlInputText) this.FindControl("txtmoneyweixin");
                this.hidmoney             = (System.Web.UI.HtmlControls.HtmlInputHidden) this.FindControl("hidmoney");
                this.requestcommission    = (System.Web.UI.HtmlControls.HtmlAnchor) this.FindControl("requestcommission");
                this.requestcommission1   = (System.Web.UI.HtmlControls.HtmlAnchor) this.FindControl("requestcommission1");
                this.txtaccount.Value     = nowCurrentDistributors.RequestAccount;
                this.txtAccountName.Value = currentMember.RealName;
                decimal referralBlance = nowCurrentDistributors.ReferralBlance;
                this.litmaxmoney.Text = referralBlance.ToString("F2");
                decimal num = 0m;
                if (decimal.TryParse(SettingsManager.GetMasterSettings(false).MentionNowMoney, out num) && num > 0m)
                {
                    this.txtmoney.Attributes["placeholder"]       = "请输入大于等于" + num + "元的金额";
                    this.txtmoneyweixin.Attributes["placeholder"] = "最低提现金额" + num + "元的金额";
                    this.hidmoney.Value = num.ToString();
                }
                if (DistributorsBrower.IsExitsCommionsRequest())
                {
                    this.requestcommission.Disabled   = true;
                    this.requestcommission.InnerText  = "您的申请正在审核当中";
                    this.requestcommission1.Disabled  = true;
                    this.requestcommission1.InnerText = "您的申请正在审核当中";
                    literal.Text = "display:none";
                    System.Web.UI.WebControls.Literal literal2 = (System.Web.UI.WebControls.Literal) this.FindControl("litWechatBtn");
                    literal2.Text = "display:none";
                }
                else
                {
                    this.requestcommission.Attributes.Add("onclick", "return RequestCommissions(3)");
                    this.requestcommission1.Attributes.Add("onclick", "return RequestCommissions(1)");
                }
            }
        }
Пример #49
0
 public static HtmlSelect Agrega_Seleccionar(System.Web.UI.HtmlControls.HtmlSelect cmb)
 {
     cmb.Items.Insert(0, new ListItem("Seleccionar", "0"));
     cmb.SelectedIndex = 0;
     return(cmb);
 }
Пример #50
0
 private void unSetErr(System.Web.UI.HtmlControls.HtmlGenericControl obj, System.Web.UI.HtmlControls.HtmlSelect obj2)
 {
     obj.InnerHtml = "&nbsp;";
     obj2.Style.Add("border-color", "green");
 }
Пример #51
0
        protected override void OnLoad(EventArgs e)
        {
            AddStyles();

            Control banner = AddDiv(Body, null);
            banner.ID = "banner";

            AddGeneric(banner, "h1", null, Title);

            Control content = AddDiv(Body, null);
            content.ID = "content";
            
            string summary = JsonRpcHelpAttribute.GetText(ServiceDescriptor.AttributeProvider);

            if (summary.Length > 0)
                AddGeneric(content, "span", "service-help", summary);

            Control form = AddGeneric(content, "form");
            form.ID = "TestForm";
    
            Control selectionPara = AddPara(form, null, "Select method to test: ");
    
            HtmlSelect methodSelector = new HtmlSelect();
            methodSelector.ID = "Method";
            methodSelector.Attributes.Add("onchange", "return Method_onchange(this)");

            foreach (IRpcMethodDescriptor method in SortedMethods)
                methodSelector.Items.Add(method.Name);
    
            selectionPara.Controls.Add(methodSelector);

            HtmlInputButton testButton = new HtmlInputButton();
            testButton.ID = "Test";
            testButton.Value = "Test";
            testButton.Attributes["onclick"] = "return Test_onclick(this)";
            testButton.Attributes["accesskey"] = "T";
            selectionPara.Controls.Add(new LiteralControl(" "));
            selectionPara.Controls.Add(testButton);

            selectionPara.Controls.Add(new LiteralControl(" "));

            HyperLink helpLink = new HyperLink();
            helpLink.Text = "Help";
            helpLink.NavigateUrl = Request.FilePath + "?help";
            selectionPara.Controls.Add(helpLink);

            Control requestPara = AddPara(form, null, "Request: ");

            HtmlTextArea requestArea = new HtmlTextArea();
            requestArea.ID = "Request";
            requestArea.Rows = 10;
            requestArea.Attributes.Add("title", "Enter the array of parameters (in JSON) to send in the RPC request.");
            requestPara.Controls.Add(requestArea);
        
            Control responsePara = AddPara(form, null, "Response: ");

            HtmlTextArea responseArea = new HtmlTextArea();
            responseArea.ID = "Response";
            responseArea.Rows = 10;
            responseArea.Attributes.Add("readonly", "readonly");
            responseArea.Attributes.Add("title", "The result or error object (in JSON) from the last RPC response.");
            responsePara.Controls.Add(responseArea);

            Control timingPara = AddPara(content, null, null);
            timingPara.ID = "timing";

            AddScriptInclude((Request.ApplicationPath.Equals("/") ? 
                string.Empty : Request.ApplicationPath) + "/json.js");

            AddScriptBlock(@"
                var callTemplates = " + BuildCallTemplatesObject() + @";
                var theForm = null;
                var nextRequestId = 0;

                window.onload = function() 
                { 
                    theForm = document.forms[0]; 
                    Method_onchange(theForm.Method); 
                }

                function Method_onchange(sender)
                {
                    theForm.Request.value = callTemplates[sender.options[sender.selectedIndex].value];
                }

                function Test_onclick(sender)
                {
                    var form = theForm;

                    try
                    {
                        var request = { 
                            id : ++nextRequestId, 
                            method : form.Method.value, 
                            params : JSON.parse(theForm.Request.value) };
                        
                        form.Response.value = '';
                        form.Response.className = '';
                        var response = callSync(request);
                        form.Response.value = JSON.stringify(response);
                    }
                    catch (e)
                    {
                        form.Response.className = 'error';
                        form.Response.value = JSON.stringify(e);
                        alert(e.message);
                    }
                }

                function callSync(request)
                {
                    var clockStart = new Date();
                    var http = window.ActiveXObject ? 
                        new ActiveXObject('Microsoft.XMLHTTP') :
                        new XMLHttpRequest();
                    http.open('POST', '" + Request.FilePath + @"', false);
                    http.setRequestHeader('Content-Type', 'text/plain; charset=utf-8');
                    http.setRequestHeader('X-JSON-RPC', request.method);
                    http.send(JSON.stringify(request));
                    if (http.status != 200)
                        throw { message : http.status + ' ' + http.statusText, toString : function() { return message; } };
                    var response = JSON.eval(http.responseText);
                    var timeTaken = (new Date()) - clockStart;
                    var timing = document.getElementById('timing');
                    var timingText = document.createTextNode('Time taken = ' + (timeTaken / 1000).toFixed(4) + ' milliseconds.');
                    if (timing.firstChild == null)
                        timing.appendChild(timingText);
                    else
                        timing.replaceChild(timingText, timing.firstChild);
                    if (response.error != null) throw response.error;
                    return response.result;
                }
                ");

            base.OnLoad(e);
        }
Пример #52
0
 protected override void AttachChildControls()
 {
     this.dropRegions         = (RegionSelector)this.FindControl("dropRegions");
     this.txtShipTo           = (System.Web.UI.WebControls.TextBox) this.FindControl("txtShipTo");
     this.txtAddress          = (System.Web.UI.WebControls.TextBox) this.FindControl("txtAddress");
     this.txtZipcode          = (System.Web.UI.WebControls.TextBox) this.FindControl("txtZipcode");
     this.txtCellPhone        = (System.Web.UI.WebControls.TextBox) this.FindControl("txtCellPhone");
     this.txtTelPhone         = (System.Web.UI.WebControls.TextBox) this.FindControl("txtTelPhone");
     this.txtInvoiceTitle     = (System.Web.UI.WebControls.TextBox) this.FindControl("txtInvoiceTitle");
     this.drpShipToDate       = (System.Web.UI.HtmlControls.HtmlSelect) this.FindControl("drpShipToDate");
     this.litTaxRate          = (System.Web.UI.WebControls.Label) this.FindControl("litTaxRate");
     this.shippingModeList    = (Common_ShippingModeList)this.FindControl("Common_ShippingModeList");
     this.paymentModeList     = (Common_PaymentModeList)this.FindControl("grd_Common_PaymentModeList");
     this.inputPaymentModeId  = (System.Web.UI.HtmlControls.HtmlInputHidden) this.FindControl("inputPaymentModeId");
     this.inputShippingModeId = (System.Web.UI.HtmlControls.HtmlInputHidden) this.FindControl("inputShippingModeId");
     this.hdbuytype           = (System.Web.UI.HtmlControls.HtmlInputHidden) this.FindControl("hdbuytype");
     this.pannel_useraddress  = (System.Web.UI.WebControls.Panel) this.FindControl("pannel_useraddress");
     this.lblPaymentPrice     = (FormatedMoneyLabel)this.FindControl("lblPaymentPrice");
     this.lblShippModePrice   = (FormatedMoneyLabel)this.FindControl("lblShippModePrice");
     this.chkTax                = (System.Web.UI.HtmlControls.HtmlInputCheckBox) this.FindControl("chkTax");
     this.cartProductList       = (Common_SubmmintOrder_ProductList)this.FindControl("Common_SubmmintOrder_ProductList");
     this.cartGiftList          = (Common_SubmmintOrder_GiftList)this.FindControl("Common_SubmmintOrder_GiftList");
     this.litProductAmount      = (System.Web.UI.WebControls.Literal) this.FindControl("litProductAmount");
     this.litProductBundling    = (System.Web.UI.WebControls.Literal) this.FindControl("litProductBundling");
     this.litAllWeight          = (System.Web.UI.WebControls.Label) this.FindControl("litAllWeight");
     this.litPoint              = (System.Web.UI.WebControls.Label) this.FindControl("litPoint");
     this.hlkSentTimesPoint     = (System.Web.UI.WebControls.HyperLink) this.FindControl("hlkSentTimesPoint");
     this.lblOrderTotal         = (FormatedMoneyLabel)this.FindControl("lblOrderTotal");
     this.txtMessage            = (System.Web.UI.WebControls.TextBox) this.FindControl("txtMessage");
     this.hlkFeeFreight         = (System.Web.UI.WebControls.HyperLink) this.FindControl("hlkFeeFreight");
     this.hlkReducedPromotion   = (System.Web.UI.WebControls.HyperLink) this.FindControl("hlkReducedPromotion");
     this.lblTotalPrice         = (FormatedMoneyLabel)this.FindControl("lblTotalPrice");
     this.htmlCouponCode        = (System.Web.UI.HtmlControls.HtmlInputHidden) this.FindControl("htmlCouponCode");
     this.CmbCoupCode           = (System.Web.UI.HtmlControls.HtmlSelect) this.FindControl("CmbCoupCode");
     this.tbCoupon              = (System.Web.UI.HtmlControls.HtmlTable) this.FindControl("tbCoupon");
     this.litCouponAmout        = (FormatedMoneyLabel)this.FindControl("litCouponAmout");
     this.btnCreateOrder        = ButtonManager.Create(this.FindControl("btnCreateOrder"));
     this.btnCreateOrder.Click += new System.EventHandler(this.btnCreateOrder_Click);
     Hidistro.Membership.Context.SiteSettings masterSettings = Hidistro.Membership.Context.SettingsManager.GetMasterSettings(false);
     if (!this.Page.IsPostBack)
     {
         this.BindUserAddress();
         this.shippingModeList.DataSource = ShoppingProcessor.GetShippingModes();
         this.shippingModeList.DataBind();
         this.ReBindPayment();
         if (this.shoppingCart != null)
         {
             this.litTaxRate.Text = masterSettings.TaxRate.ToString(System.Globalization.CultureInfo.InvariantCulture);
             this.BindShoppingCartInfo(this.shoppingCart);
             if (this.isGroupBuy || this.isCountDown || this.isBundling || this.shoppingCart.LineItems.Count == 0)
             {
                 this.tbCoupon.Visible = false;
             }
             this.CmbCoupCode.DataTextField  = "DisplayText";
             this.CmbCoupCode.DataValueField = "ClaimCode";
             this.CmbCoupCode.DataSource     = ShoppingProcessor.GetCoupon(this.shoppingCart.GetTotal());
             this.CmbCoupCode.DataBind();
             System.Web.UI.WebControls.ListItem item = new System.Web.UI.WebControls.ListItem("", "0");
             this.CmbCoupCode.Items.Insert(0, item);
             this.hdbuytype.Value            = this.buytype;
             this.pannel_useraddress.Visible = (!Hidistro.Membership.Context.HiContext.Current.User.IsAnonymous && PersonalHelper.GetShippingAddressCount(Hidistro.Membership.Context.HiContext.Current.User.UserId) > 0);
         }
     }
 }
Пример #53
0
        private void AddItemSelectField(HtmlGenericControl container)
        {
            using (HtmlGenericControl field = HtmlControlHelper.GetField("four wide field"))
            {
                using (HtmlGenericControl label = HtmlControlHelper.GetLabel(Titles.Select, "ItemSelect"))
                {
                    field.Controls.Add(label);
                }

                this.itemSelect = new HtmlSelect();
                this.itemSelect.ID = "ItemSelect";
                field.Controls.Add(this.itemSelect);
                container.Controls.Add(field);
            }
        }
Пример #54
0
 private void setErr(System.Web.UI.HtmlControls.HtmlGenericControl obj, System.Web.UI.HtmlControls.HtmlSelect obj2, string err)
 {
     obj.InnerHtml = err;
     obj2.Style.Add("border-color", "red");
 }
Пример #55
0
        private void AddStoreSelectField(HtmlGenericControl container)
        {
            using (HtmlGenericControl field = HtmlControlHelper.GetField("two wide field"))
            {
                using (HtmlGenericControl label = HtmlControlHelper.GetLabel(Titles.Store, "StoreSelect"))
                {
                    field.Controls.Add(label);
                }

                this.storeSelect = new HtmlSelect();
                this.storeSelect.ID = "StoreSelect";
                field.Controls.Add(this.storeSelect);
                container.Controls.Add(field);
            }
        }