public void InitializeControl() { try { suppliersOperator = new SupplierDAL(); if (!IsPostBack) { List<Supplier> suppliersList = suppliersOperator.SelectAll((bool?)IsArabic, true); if (suppliersList != null && suppliersList.Count > 0) { rptSuppliers.DataSource = suppliersList; rptSuppliers.DataBind(); } } } catch { Response.Redirect(Utility.AppendQueryString(PagesPathes.ErrorPage, new KeyValue(CommonStrings.BackUrl, CommonStrings.ViewDefault))); } }
private void FillSuppliersDrpMenu() { SupplierDAL supplierOperator = new SupplierDAL(); List<Supplier> suppliersList = supplierOperator.SelectAll(IsArabic, true); if (suppliersList != null && suppliersList.Count > 0) { drpSupplier.DataSource = suppliersList; drpSupplier.DataValueField = Supplier.CommonColumns.ID; if (IsArabic) drpSupplier.DataTextField = Supplier.TableColumns.NameAr; else drpSupplier.DataTextField = Supplier.TableColumns.NameEn; drpSupplier.DataBind(); } drpSupplier.Items.Insert(0, Literals.ListHeader); }