private void Control_CheckBoxList(TableCell myPropertyControl, Variant_Property myVariant_Property, bool IsPostBack, string Default_Value) { CheckBoxList myCheckBoxList = new CheckBoxList(); myCheckBoxList.ID = myVariant_Property.Variant_PropertyID; List <Property_Option> myProperty_Options = Get_Product_Variant_Property_Options( myVariant_Property.Variant_PropertyID, "SortOrder", true.ToString()); foreach (Property_Option myProperty_Option in myProperty_Options) { myCheckBoxList.Items.Add(new ListItem(myProperty_Option.Option_Name, myProperty_Option.Option_Value)); } if (!IsPostBack) { if (!DataEval.IsEmptyQuery(Default_Value)) { myCheckBoxList.SelectedValue = Default_Value; } } myPropertyControl.Controls.Add(myCheckBoxList); }
private void Control_DropdownList(TableCell myPropertyControl, Variant_Property myVariant_Property, bool IsPostBack, int Width, string Default_Value) { DropDownList myDropdownList = new DropDownList(); myDropdownList.ID = myVariant_Property.Variant_PropertyID; myDropdownList.Width = Unit.Pixel(Width + 5); List <Property_Option> myProperty_Options = Get_Product_Variant_Property_Options( myVariant_Property.Variant_PropertyID, "SortOrder", true.ToString()); foreach (Property_Option myProperty_Option in myProperty_Options) { myDropdownList.Items.Add(new ListItem(myProperty_Option.Option_Name, myProperty_Option.Option_Value)); } if (!IsPostBack) { if (!DataEval.IsEmptyQuery(Default_Value)) { myDropdownList.SelectedValue = Default_Value; } else { myDropdownList.SelectedIndex = 0; } } myPropertyControl.Controls.Add(myDropdownList); }
private void Control_TextBox(TableCell myPropertyControl, Variant_Property myVariant_Property, bool IsPostBack, int Width, string Default_Value) { TextBox myTextBox = new TextBox(); myTextBox.ID = myVariant_Property.Variant_PropertyID; myTextBox.Width = Unit.Pixel(Width); if (!IsPostBack) { myTextBox.Text = Default_Value; } myPropertyControl.Controls.Add(myTextBox); }
private void Control_CheckBox(TableCell myPropertyControl, Variant_Property myVariant_Property, bool IsPostBack, string Default_Value) { CheckBox myCheckBox = new CheckBox(); myCheckBox.ID = myVariant_Property.Variant_PropertyID; myCheckBox.Text = myVariant_Property.Property_Name; if (!IsPostBack) { if (!DataEval.IsEmptyQuery(Default_Value)) { myCheckBox.Checked = Convert.ToBoolean(Default_Value); } else { myCheckBox.Checked = true; } } myPropertyControl.Controls.Add(myCheckBox); }
private void Control_DatePicker(TableCell myPropertyControl, Variant_Property myVariant_Property, bool IsPostBack, int Width, string Default_Value) { RadDatePicker myDatePicker = new RadDatePicker(); myDatePicker.ID = myVariant_Property.Variant_PropertyID; myDatePicker.Width = Unit.Pixel(Width); if (!IsPostBack) { if (!DataEval.IsEmptyQuery(Default_Value)) { myDatePicker.SelectedDate = Convert.ToDateTime(Default_Value); } else { myDatePicker.SelectedDate = DateTime.Today; } } myPropertyControl.Controls.Add(myDatePicker); }