// GET: Vendor public ActionResult Index() { VendorModel VM = new VendorModel(); VM = VendorBL.GetVendor(); return(View(VM)); }
void PoupulateVendorGrid() { VendorBL vendorBl = new VendorBL(); List <Vendor> lstVendor = vendorBl.GetVendor(); BindingSource vendorListBS = new BindingSource(); if (lstVendor != null && lstVendor.Count > 0) { vendorListBS.DataSource = lstVendor; } else { vendorListBS.DataSource = new List <Vendor>(); } dgvVendor.DataSource = vendorListBS; }