protected void GridView_Product_Variants_Sorting(object sender, GridViewSortEventArgs e) { ProductVariantMgr myProductVariantMgr = new ProductVariantMgr(); GridView_Product_Variants.DataSource = myProductVariantMgr.Get_Product_Variants(e.SortExpression, e.SortDirection.ToString()); GridView_Product_Variants.DataBind(); }
private void Control_Init() { ProductVariantMgr myProductVariantMgr = new ProductVariantMgr(); GridView_Product_Variants.DataSource = myProductVariantMgr.Get_Product_Variants(); GridView_Product_Variants.DataBind(); }
private void Control_Init() { ProductVariantMgr myProductVariantMgr = new ProductVariantMgr(); List <Variant> myVariants = myProductVariantMgr.Get_Product_Variants(); DataList_VariantList.DataSource = myVariants; DataList_VariantList.DataBind(); if (DataEval.IsEmptyQuery(_product_variantid)) { _product_variantid = myVariants[0].Product_VariantID; ViewState["Product_VariantID"] = _product_variantid; } ProductAttributeMgr myProductAttributeMgr = new ProductAttributeMgr(); GridView_Attributes.DataSource = myProductAttributeMgr.Get_Product_Attribute_Types(_product_variantid); GridView_Attributes.DataBind(); lbl_Variant.Text = myProductVariantMgr.Get_Product_Variant(_product_variantid).Variant_Name; MultiView_Attribute.SetActiveView(View_VariantList); }
private void Control_FillData() { // ViewState ViewState["CategoryID"] = _categoryid; ViewState["ProductEdit_URL"] = _productedit_url; ProductVariantMgr myProductVariantMgr = new ProductVariantMgr(); ProductMgr myProductMgr = new ProductMgr(); // Search tbx_Search_Product_SKU.Text = ""; tbx_Search_Manufacturer_SKU.Text = ""; tbx_Search_Product_Title.Text = ""; ViewState["Search_Field"] = _search_field; ViewState["Keyword"] = _keyword; // Filter: Product Variant droplist_Filter_Product_Variant.DataSource = myProductVariantMgr.Get_Product_Variants(); droplist_Filter_Product_Variant.DataTextField = "Variant_Name"; droplist_Filter_Product_Variant.DataValueField = "Product_VariantID"; droplist_Filter_Product_Variant.DataBind(); // Add an empty ListItem myEmpty_Product_Variant = new ListItem(); myEmpty_Product_Variant.Text = "Select a Product Variant"; myEmpty_Product_Variant.Value = "-1"; droplist_Filter_Product_Variant.Items.Insert(0, myEmpty_Product_Variant); droplist_Filter_Product_Variant.SelectedIndex = 0; // Filter: manufacturer droplist_Filter_Manufacturer.DataSource = myProductMgr.Get_Manufacturers("Name", true.ToString()); droplist_Filter_Manufacturer.DataTextField = "Name"; droplist_Filter_Manufacturer.DataValueField = "ManufacturerID"; droplist_Filter_Manufacturer.DataBind(); ListItem myEmpty_Manufacturer = new ListItem(); myEmpty_Manufacturer.Text = "Select a Manufacturer"; myEmpty_Manufacturer.Value = "-1"; droplist_Filter_Manufacturer.Items.Insert(0, myEmpty_Manufacturer); droplist_Filter_Manufacturer.SelectedIndex = 0; }
private void Control_FillData() { ProductVariantMgr myProductVariantMgr = new ProductVariantMgr(); droplist_AddAttribute_VariantID.Items.Clear(); droplist_AddAttribute_VariantID.DataSource = myProductVariantMgr.Get_Product_Variants(); droplist_AddAttribute_VariantID.DataTextField = "Variant_Name"; droplist_AddAttribute_VariantID.DataValueField = "Product_VariantID"; droplist_AddAttribute_VariantID.DataBind(); droplist_AddAttribute_VariantID.SelectedIndex = 0; tbx_AddAttribute_Name.Text = ""; tbx_AddAttribute_Description.Text = ""; chkbox_AddAttribute_IsActive.Checked = true; tbx_EditAttribute_Name.Text = ""; tbx_EditAttribute_Description.Text = ""; chkbox_EditAttribute_IsActive.Checked = true; }
private void Control_FillData() { ProductVariantMgr myProductVariantMgr = new ProductVariantMgr(); ProductMgr myProductMgr = new ProductMgr(); CurrencyMgr myCurrencyMgr = new CurrencyMgr(); // Step 1 Product Variant droplist_Product_VariantID.DataSource = myProductVariantMgr.Get_Product_Variants(); droplist_Product_VariantID.DataTextField = "Variant_Name"; droplist_Product_VariantID.DataValueField = "Product_VariantID"; droplist_Product_VariantID.DataBind(); droplist_Product_VariantID.SelectedIndex = 0; tbx_Filter_ProductIndex_Title.Text = ""; droplist_Filter_OrderBy.SelectedIndex = 0; droplist_Filter_Direction.SelectedIndex = 0; lbl_Selected_Product_Index.Text = "Unselected"; // Step 2 Product Index tbx_Index_Title.Text = ""; tbx_Index_Short_Description.Text = ""; tbx_Index_Admin_Comment.Text = ""; chkbox_Index_IsActive.Checked = true; // Step 3 Product lbl_Product_Index.Text = ""; #region Product Title Format //Gets your enum names and adds it to a string array Array enumTitleNames = Enum.GetValues(typeof(Title_Type)); //Creates an ArrayList ArrayList myTitleFormats = new ArrayList(); //Loop through your string array and poppulates the ArrayList foreach (Title_Type myTitle_Type in enumTitleNames) { myTitleFormats.Add(new { Value = myTitle_Type.ToString(), Name = StringEnum.GetStringValue(myTitle_Type) }); } //Bind the ArrayList to your DropDownList rbtn_Product_Title_Type.DataSource = myTitleFormats; rbtn_Product_Title_Type.DataTextField = "Name"; rbtn_Product_Title_Type.DataValueField = "Value"; rbtn_Product_Title_Type.DataBind(); // Set Default value rbtn_Product_Title_Type.SelectedValue = Title_Type.Override.ToString(); #endregion tbx_Product_Title.Text = ""; tbx_Product_SKU.Text = ""; droplist_Product_ManufacturerID.DataSource = myProductMgr.Get_Manufacturers("Name", true.ToString()); droplist_Product_ManufacturerID.DataTextField = "Name"; droplist_Product_ManufacturerID.DataValueField = "ManufacturerID"; droplist_Product_ManufacturerID.DataBind(); droplist_Product_ManufacturerID.SelectedIndex = 0; tbx_Product_Manufacturer_SKU.Text = ""; droplist_Product_CurrencyID.DataSource = myCurrencyMgr.Get_Currencies("Currency_Name", true.ToString()); droplist_Product_CurrencyID.DataTextField = "Currency_ShortName"; droplist_Product_CurrencyID.DataValueField = "CurrencyID"; droplist_Product_CurrencyID.DataBind(); droplist_Product_CurrencyID.SelectedIndex = 0; RadNumericTextBox_Product_RRP.Text = "0.00"; chkbox_Product_IsActive.Checked = true; }