public async Task <ActionResult> DeleteConfirmed(int id) { M_PartyMaster m_PartyMaster = await db.M_PartyMaster.FindAsync(id); db.M_PartyMaster.Remove(m_PartyMaster); await db.SaveChangesAsync(); return(RedirectToAction("Index")); }
public async Task <ActionResult> Edit([Bind(Include = "PartyID,PartyName,Address,PinCode,PhoneNo,EmailID,Remarks,CreatedBy,CreatedDate,Active")] M_PartyMaster m_PartyMaster) { if (ModelState.IsValid) { m_PartyMaster.ModifiedBy = Session["CurrentUser"].ToString(); m_PartyMaster.ModifiedDate = DateTime.Now; db.Entry(m_PartyMaster).State = EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(m_PartyMaster)); }
// GET: PartyMaster/Edit/5 public async Task <ActionResult> Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } M_PartyMaster m_PartyMaster = await db.M_PartyMaster.FindAsync(id); if (m_PartyMaster == null) { return(HttpNotFound()); } return(View(m_PartyMaster)); }