/// <summary> /// Loads Subacategory list based on CategoryID. /// </summary> private void LoadRecord_Subcategory() { try { using (BC_Corporate_ProductProfile bcProductProfile = new BC_Corporate_ProductProfile()) { ddlSubcategory.Items.Clear(); ddlSubcategory.Items.Add(new ListItem("Select Category", "-1")); DataTable dtSubcategory = bcProductProfile.LoadRecord_Subcategory(intCategoryID); if (dtSubcategory.Rows.Count > 0) { ddlSubcategory.DataSource = dtSubcategory; ddlSubcategory.DataValueField = "SubcategoryID"; ddlSubcategory.DataTextField = "Subcategory"; ddlSubcategory.DataBind(); } else { lblSystemMessage.Text = "No Subcategory available"; } } } catch (Exception Exp) { lblSystemMessage.Text = Exp.Message.ToString(); } }
/// <summary> /// Loads Subacategory list based on CategoryID. /// </summary> private void LoadRecord_Subcategory(int _CategoryID) { try { using (BC_Corporate_ProductProfile bcProductProfile = new BC_Corporate_ProductProfile()) { //System.Threading.Thread.Sleep(10000); ddlSubcategory.Items.Clear(); ddlSubcategory.Items.Add(new ListItem("Select Subcategory", "-1")); DataTable dtSubcategory = bcProductProfile.LoadRecord_Subcategory(_CategoryID); if (dtSubcategory.Rows.Count > 0) { ddlSubcategory.DataSource = dtSubcategory; ddlSubcategory.DataValueField = "SubcategoryID"; ddlSubcategory.DataTextField = "Subcategory"; ddlSubcategory.DataBind(); } else { lblSystemMessage.Text = UTLUtilities.ShowGeneralMessage("No Subcategory available"); } } } catch (Exception Exp) { lblSystemMessage.Text = Exp.Message.ToString(); } }