/// <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 SecondSubcategory List Based On SubcategoryID. /// </summary> private void LoadRecord_2ndSubcategory() { try { using (BC_Corporate_ProductProfile bcProductProfile = new BC_Corporate_ProductProfile()) { ddl2ndSubCategory.Items.Clear(); ddl2ndSubCategory.Items.Add(new ListItem("Select Second Subcategory", "-1")); DataTable dt2ndSubcategory = bcProductProfile.LoadRecord_2ndSubcategory(intCategoryID, intSubcategoryID); if (dt2ndSubcategory.Rows.Count > 0) { ddl2ndSubCategory.DataSource = dt2ndSubcategory; ddl2ndSubCategory.DataValueField = "SecondSubcatID"; ddl2ndSubCategory.DataTextField = "SecondSubCategory"; ddl2ndSubCategory.DataBind(); } else { lblSystemMessage.Text = "No Secondary sub category 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(9999); 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 = "No Subcategory available"; } } } catch (Exception Exp) { lblSystemMessage.Text = Exp.Message.ToString(); } }
/// <summary> /// Loads all the Product Model Depending on SecondSuubcatID. /// </summary> private void LoadList_Model() { try { int categoryID = Convert.ToInt32(ddlCategory.SelectedValue); int subCategoryID = Convert.ToInt32(ddlSubcategory.SelectedValue); int secondSubcatID = Convert.ToInt32(ddl2ndSubCategory.SelectedValue); using (BC_Corporate_ProductProfile bcProductProfile = new BC_Corporate_ProductProfile()) { DataTable dtModel = bcProductProfile.LoadList_Model(categoryID, subCategoryID, secondSubcatID); if (dtModel.Rows.Count > 0) { ddlModel.Items.Clear(); ddlModel.Items.Add(new ListItem("Select Model", "-1")); ddlModel.DataSource = dtModel; ddlModel.DataValueField = "ProductModelID"; ddlModel.DataTextField = "ProductModel"; ddlModel.DataBind(); } else { ddlModel.Items.Clear(); ddlModel.Items.Add(new ListItem("Select Model", "-1")); ddlModel.DataSource = null; ddlModel.DataBind(); lblSystemMessage.Text = UTLUtilities.ShowGeneralMessage("No Model 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(); } }
/// <summary> /// Loads List of seller type epending On SubcategoryID from RealEstateSellerType table. /// </summary> /// <param name="intSubcategoryID"></param> private void LoadList_SellerType(int intSubcategoryID) { try { using (BC_Corporate_ProductProfile bcProductProfile = new BC_Corporate_ProductProfile()) { ddlSellerType.Items.Clear(); ddlSellerType.Items.Add(new ListItem("Select Seller Type", "-1")); DataTable dtSellerType = bcProductProfile.RealEstate_LoadList_SellerType(intSubcategoryID); if (dtSellerType.Rows.Count > 0) { ddlSellerType.DataSource = dtSellerType; ddlSellerType.DataValueField = "SellerTypeID"; ddlSellerType.DataTextField = "SellerType"; ddlSellerType.DataBind(); } else { lblSystemMessage.Text = UTLUtilities.ShowGeneralMessage("No Seller Type available."); } } } catch (Exception Exp) { lblSystemMessage.Text = Exp.Message.ToString(); } }