public async Task <ActionResult> DeleteConfirmed(string id) { COPR16_POSITION_MSTR cOPR16_POSITION_MSTR = await db.COPR16_POSITION_MSTR.FindAsync(id); db.COPR16_POSITION_MSTR.Remove(cOPR16_POSITION_MSTR); await db.SaveChangesAsync(); return(RedirectToAction("Index")); }
public async Task <ActionResult> Create([Bind(Include = "POS_ID,POS_DESC,ADATE,CRE_BY,MOD_BY,MOD_DATE,FLGACT")] COPR16_POSITION_MSTR cOPR16_POSITION_MSTR) { if (ModelState.IsValid) { db.COPR16_POSITION_MSTR.Add(cOPR16_POSITION_MSTR); await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(cOPR16_POSITION_MSTR)); }
public async Task <ActionResult> Edit([Bind(Include = "POS_ID,POS_DESC,ADATE,CRE_BY,MOD_BY,MOD_DATE,FLGACT")] COPR16_POSITION_MSTR cOPR16_POSITION_MSTR) { if (ModelState.IsValid) { cOPR16_POSITION_MSTR.MOD_DATE = System.DateTime.Now; cOPR16_POSITION_MSTR.MOD_BY = System.Environment.UserName.ToLower(); db.Entry(cOPR16_POSITION_MSTR).State = EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(cOPR16_POSITION_MSTR)); }
// GET: COPR16_POSITION_MSTR/Edit/5 public async Task <ActionResult> Edit(string id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } COPR16_POSITION_MSTR cOPR16_POSITION_MSTR = await db.COPR16_POSITION_MSTR.FindAsync(id); if (cOPR16_POSITION_MSTR == null) { return(HttpNotFound()); } return(View(cOPR16_POSITION_MSTR)); }
// GET: COPR16_POSITION_MSTR/Active/5 public async Task <ActionResult> Active(string id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } COPR16_POSITION_MSTR cOPR16_POSITION_MSTR = await db.COPR16_POSITION_MSTR.FindAsync(id); if (cOPR16_POSITION_MSTR == null) { return(HttpNotFound()); } //db.COPR16_POSITION_MSTR.Remove(cOPR16_POSITION_MSTR); cOPR16_POSITION_MSTR.FLGACT = true; cOPR16_POSITION_MSTR.MOD_DATE = System.DateTime.Now; cOPR16_POSITION_MSTR.MOD_BY = System.Environment.UserName.ToLower(); await db.SaveChangesAsync(); return(RedirectToAction("Index")); }