public async Task <ActionResult> DeleteConfirmed(string id) { tbl_vendor tbl_vendor = await db.tbl_vendor.FindAsync(id); db.tbl_vendor.Remove(tbl_vendor); await db.SaveChangesAsync(); return(RedirectToAction("Index")); }
public async Task <ActionResult> Edit([Bind(Include = "AutoID,ID,Name,ContactPerson,ContactNo,PhoneNo,VendorType,Type,Place,DOB,GSTNo,TINNo,PANNo,CINNo,AdhaarNo,OpeningBalance,OpeningBalanceType,OpeningBalanceDate,CreditLimit,CreditPeriod,CreditInterestRate,DebitInterestRate,CreatedDatetime,Photo,Remark,SuretyPerson,SuretyPersonContactNo,SuretyPersonAddress")] tbl_vendor tbl_vendor) { if (ModelState.IsValid) { db.Entry(tbl_vendor).State = EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(tbl_vendor)); }
public async Task <ActionResult> Create([Bind(Include = "AutoID,ID,Name,ContactPerson,ContactNo,PhoneNo,VendorType,Type,Place,DOB,GSTNo,TINNo,PANNo,CINNo,AdhaarNo,OpeningBalance,OpeningBalanceType,OpeningBalanceDate,CreditLimit,CreditPeriod,CreditInterestRate,DebitInterestRate,CreatedDatetime,Photo,Remark,SuretyPerson,SuretyPersonContactNo,SuretyPersonAddress")] tbl_vendor tbl_vendor) { if (ModelState.IsValid) { db.tbl_vendor.Add(tbl_vendor); await db.SaveChangesAsync(); return(RedirectToAction("Index")); } ViewBag.Type = new SelectList(db.tbl_vendorType, "ID", "Name", tbl_vendor.Type); return(View(tbl_vendor)); }
// GET: Vendor/Details/5 public async Task <ActionResult> Details(string id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } tbl_vendor tbl_vendor = await db.tbl_vendor.FindAsync(id); if (tbl_vendor == null) { return(HttpNotFound()); } return(View(tbl_vendor)); }
// GET: Vendor/Edit/5 public async Task <ActionResult> Edit(string id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } tbl_vendor tbl_vendor = await db.tbl_vendor.FindAsync(id); if (tbl_vendor == null) { return(HttpNotFound()); } ViewBag.Type = new SelectList(db.tbl_vendorType, "ID", "Name", tbl_vendor.Type); return(View(tbl_vendor)); }
public async Task <ActionResult> CreateSupplier([Bind(Include = "AutoID,ID,Name,ContactPerson,ContactNo,PhoneNo,VendorType,Type,Place,DOB,GSTNo,TINNo,PANNo,CINNo,AdhaarNo,OpeningBalance,OpeningBalanceType,OpeningBalanceDate,CreditLimit,CreditPeriod,CreditInterestRate,DebitInterestRate,CreatedDatetime,Photo,Remark,SuretyPerson,SuretyPersonContactNo,SuretyPersonAddress")] tbl_vendor tbl_vendor) { if (ModelState.IsValid) { db.tbl_vendor.Add(tbl_vendor); await db.SaveChangesAsync(); tbl_Sequence NewSequenceValue = Helper.GenericHelper.GetNextUpdatedData("tbl_Supplier"); db.Entry(NewSequenceValue).State = EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(tbl_vendor)); }