protected void btn_AddOption_Click(object sender, EventArgs e) { if (Page.IsValid) { ProductVariantMgr myProductVariantMgr = new ProductVariantMgr(); string OptionID = Nexus.Core.Tools.IDGenerator.Get_New_GUID(); // Product Variant e2Data[] UpdateData = { new e2Data("OptionID", OptionID), new e2Data("Variant_PropertyID", _variant_propertyid), new e2Data("Option_Name", tbx_AddOption_Name.Text), new e2Data("Option_Value", tbx_AddOption_Value.Text), new e2Data("SortOrder", (myProductVariantMgr.Count_Variant_Property_Option(_variant_propertyid) + 1).ToString()), new e2Data("IsActive", chkbox_AddOption_IsActive.Checked.ToString()) }; myProductVariantMgr.Add_Product_Variant_Property_Option(UpdateData); Control_FillData_Option(); RadGrid_Options.Rebind(); } }
private void Create_Property_Options(string Variant_PropertyID) { string OptionID = Nexus.Core.Tools.IDGenerator.Get_New_GUID(); ProductVariantMgr myProductVariantMgr = new ProductVariantMgr(); e2Data[] UpdateData = { new e2Data("OptionID", OptionID), new e2Data("Variant_PropertyID", Variant_PropertyID), new e2Data("Option_Name", "Default Name"), new e2Data("Option_Value", "Default Value"), new e2Data("SortOrder", "1") }; myProductVariantMgr.Add_Product_Variant_Property_Option(UpdateData); }