public ActionResult DeleteConfirmed(string id) { PayRollPrimary payrollprimary = db.PayRollPrimaries.Find(id); db.PayRollPrimaries.Remove(payrollprimary); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "EmpMonthYear,CompanyID,MonthYear,StartDate,EndDate,EmpNo,TotalDays,EarnedDays,RestDays,AbsentDays,SickLeaveDays,AnnualLeaveDays,CasualDays,OtherLeaveDays,LateInMins,OverTimeMins,EmpID,AnnualLVEncashmentDays,BadliPNo,BadliCompanyID,BadliDays,PreparedBy,PreparedDate,Approved,CreatedDate,IsEdited,TransferedToOracle,TransferedDate")] PayRollPrimary payrollprimary) { if (ModelState.IsValid) { db.Entry(payrollprimary).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(payrollprimary)); }
// GET: /Payroll/Edit/5 public ActionResult Edit(string id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } PayRollPrimary payrollprimary = db.PayRollPrimaries.Find(id); if (payrollprimary == null) { return(HttpNotFound()); } return(View(payrollprimary)); }
public ActionResult Approved(string id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } PayRollPrimary payrollprimary = db.PayRollPrimaries.First(aa => aa.EmpMonthYear == id); if (payrollprimary == null) { return(HttpNotFound()); } payrollprimary.Approved = true; payrollprimary.ApprovedDateTime = DateTime.Now; db.SaveChanges(); return(RedirectToAction("Index")); }