/// <summary> /// Loads the all Business Categories from category table. /// </summary> private void LoadRecord_Category() { try { using (BC_Corporate_ProductProfile bcProductProfile = new BC_Corporate_ProductProfile()) { DataTable dtCategory = bcProductProfile.LoadRecord_Category(intCountryID); if (dtCategory.Rows.Count > 0) { ddlCategory.DataSource = dtCategory; ddlCategory.DataValueField = "CategoryID"; ddlCategory.DataTextField = "Category"; ddlCategory.DataBind(); } else { lblSystemMessage.Text = "No Category available"; } } } catch (Exception Exp) { lblSystemMessage.Text = Exp.Message.ToString(); } }
/// <summary> /// Loads the all Business Categories from category table. /// </summary> private void LoadRecord_Category() { try { using (BC_Corporate_ProductProfile bcProductProfile = new BC_Corporate_ProductProfile()) { DataTable dtCategory = bcProductProfile.LoadRecord_Category(intCountryID); ddlCategory.Items.Clear(); ddlCategory.Items.Add(new ListItem("Select Category", "-1")); if (dtCategory.Rows.Count > 0) { ddlCategory.DataSource = dtCategory; ddlCategory.DataValueField = "CategoryID"; ddlCategory.DataTextField = "Category"; ddlCategory.DataBind(); } else { lblSystemMessage.Text = UTLUtilities.ShowGeneralMessage("No Category available"); } } } catch (Exception Exp) { lblSystemMessage.Text = Exp.Message.ToString(); } }