protected void grdVendor_RowDeleting(object sender, GridViewDeleteEventArgs e)
        {
            vendorManager = new VendorManager();
            string rowKey = e.Keys[0].ToString();

            int vendorID = Int32.Parse(rowKey);

            lblVendorsInsert.Text = vendorManager.DeleteVendor(vendorID);
            GetAllVendors();
        }
        public ActionResult DeleteVendor(string VP_ID, int OPM_ID, int page = 1, int pageSize = 5)
        {
            VendorManager context = new VendorManager(new DataContext());

            if (!string.IsNullOrEmpty(VP_ID))
            {
                context.DeleteVendor(Convert.ToInt32(VP_ID));
            }
            Vendor_Model objModel = new Vendor_Model();

            objModel.OPM_ID = OPM_ID;
            BindVendorGrid(objModel, page, pageSize);
            return(PartialView("VendorList", objModel));
        }
Example #3
0
        public IHttpActionResult DeleteVendor(int vendorId)
        {
            VendorManager vendorManager = new VendorManager();
            string        message;
            var           vendor = new VendorDto {
                Id = vendorId
            };

            if (vendorManager.IsValid(MethodTypes.Delete, vendor, out message))
            {
                if (vendorManager.DeleteVendor(vendor, out message))
                {
                    return(Ok());
                }
            }
            ;
            return(BadRequest(message));
        }
Example #4
0
 private void DeleteVendor(string VendorId)
 {
     Vendor.DeleteVendor(VendorId);
     MessageBox.Show("Party Record Deleted", "Party Deleted", MessageBoxButtons.OK, MessageBoxIcon.Information);
     ClearFeilds();
 }
 public ActionResult DeleteVendor(long vendorId)
 {
     VendorManager.DeleteVendor(vendorId);
     return(RedirectToAction("AdminVendors"));
 }