public void BindData() { //Bind product Type ProductTypeAdmin productTypeAdmin = new ProductTypeAdmin(); ProductTypeList.DataSource = productTypeAdmin.GetAllProductTypes(ZNodeConfigManager.SiteConfig.PortalID); ProductTypeList.DataTextField = "name"; ProductTypeList.DataValueField = "productTypeid"; ProductTypeList.DataBind(); //Bind Manufacturer ManufacturerAdmin ManufacturerAdmin = new ManufacturerAdmin(); ManufacturerList.DataSource=ManufacturerAdmin.GetAllByPortalID(ZNodeConfigManager.SiteConfig.PortalID); ManufacturerList.DataTextField = "name"; ManufacturerList.DataValueField = "manufacturerid"; ManufacturerList.DataBind(); ListItem li = new ListItem("No Manufacturer Selected", "0"); ManufacturerList.Items.Insert(0,li); //Bind Supplier SupplierService serv = new SupplierService(); TList<ZNode.Libraries.DataAccess.Entities.Supplier> list = serv.GetAll(); list.Sort("DisplayOrder Asc"); list.ApplyFilter(delegate(ZNode.Libraries.DataAccess.Entities.Supplier supplier) { return (supplier.ActiveInd == true); }); DataSet ds = list.ToDataSet(false); DataView dv = new DataView(ds.Tables[0]); ddlSupplier.DataSource = dv; ddlSupplier.DataTextField = "name"; ddlSupplier.DataValueField = "supplierid"; ddlSupplier.DataBind(); ListItem li1 = new ListItem("None", "0"); ddlSupplier.Items.Insert(0, li1); //Bind Categories this.BindTreeViewCategory(); // Bind Tax Class TaxRuleAdmin TaxRuleAdmin = new TaxRuleAdmin(); ddlTaxClass.DataSource = TaxRuleAdmin.GetAllTaxClass(); ddlTaxClass.DataTextField = "name"; ddlTaxClass.DataValueField = "TaxClassID"; ddlTaxClass.DataBind(); }
/// <summary> /// Bind data to the grid /// </summary> private void BindGridData() { TaxRuleAdmin taxRuleAdmin = new TaxRuleAdmin(); uxGrid.DataSource = taxRuleAdmin.GetAllTaxClass(); uxGrid.DataBind(); }
/// <summary> /// Bind tax classes list /// </summary> private void BindTaxClasses() { // Bind Tax Class TaxRuleAdmin TaxRuleAdmin = new TaxRuleAdmin(); ddlTaxClass.DataSource = TaxRuleAdmin.GetAllTaxClass(); ddlTaxClass.DataTextField = "name"; ddlTaxClass.DataValueField = "TaxClassID"; ddlTaxClass.DataBind(); }