private void ProductMasterChoosingForm_Load(object sender, EventArgs e) { // TODO: This line of code loads data into the 'masterDB.product_type' table. You can move, or remove it, as needed. this.product_typeTableAdapter.Fill(this.masterDB.product_type); pmSelectedList = new ProductMasterCollection(bdsProductMaster); bdsProductMaster.ResetBindings(false); }
private bool ExistInList(ProductMasterCollection collection, ProductMaster master) { foreach (ProductMaster productMaster in collection) { if(productMaster.ProductName.Equals(master.ProductName)) { return true; } } return false; }