void GetDropDownValues() { if (IsDropDownUpdated) { product.Supplier.Id = ProductSupplier.GetIdByName(dpdSupplier.selectedValue); product.Brand.Id = ProductBrand.GetIdByName(dpdProductBrand.selectedValue); product.Type.Id = ProductType.GetIdByName(dpdProductType.selectedValue); product.Tax.Id = Tax.GetIdByName(dpdTax.selectedValue); } }
private void BtnFilter_Click(object sender, EventArgs e) { SearchQuery.Query = txtFilter.Text; SetQueryType(); // Set Group if (dpdCustomerGroup.selectedIndex == 0) { SearchQuery.GroupId = ""; } else { SearchQuery.GroupId = ProductSupplier.GetIdByName(dpdCustomerGroup.selectedValue); } //Search GetCustomers(); }
void GetDropDownValues() { // Supplier if (dpdSuppliers.selectedValue.ToLower() == "(none)" || dpdSuppliers.selectedIndex == 0) { SearchQuery.SupplierId = ""; } else { SearchQuery.SupplierId = ProductSupplier.GetIdByName(dpdSuppliers.selectedValue); } // Brand if (dpdBrands.selectedValue.ToLower() == "(none)" || dpdBrands.selectedIndex == 0) { SearchQuery.BrandId = ""; } else { SearchQuery.BrandId = ProductBrand.GetIdByName(dpdBrands.selectedValue); } // Type if (dpdTypes.selectedValue.ToLower() == "(none)" || dpdTypes.selectedIndex == 0) { SearchQuery.TypeId = ""; } else { SearchQuery.TypeId = ProductType.GetIdByName(dpdTypes.selectedValue); } // Status if (dpdStatus.selectedValue.ToLower() == "(none)" || dpdStatus.selectedIndex == 0) { SearchQuery.Status = ""; } else { SearchQuery.Status = dpdStatus.selectedValue; } }