Esempio n. 1
0
        public ActionResult DeleteConfirmed(string id)
        {
            PayRollPrimary payrollprimary = db.PayRollPrimaries.Find(id);

            db.PayRollPrimaries.Remove(payrollprimary);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Esempio n. 2
0
 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));
 }
Esempio n. 3
0
        // 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));
        }
Esempio n. 4
0
        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"));
        }