示例#1
0
 public void Approve(Claim claim)
 {
     claim.Status          = (int)ClaimStatus.Approved;
     claim.ApproveDate     = DateTime.Now;
     db.Entry(claim).State = EntityState.Modified;
     db.SaveChanges();
 }
 public ActionResult Edit([Bind(Include = "ClaimId,Remark,TotalWorkingHour,AuditTrail,StaffId,Status,CreateDate,ApproveDate,PaidDate,ProjectId")] Claim claim)
 {
     if (ModelState.IsValid)
     {
         db.Entry(claim).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.ProjectId = new SelectList(db.Projects, "ProjectId", "ProjectCode", claim.ProjectId);
     ViewBag.StaffId   = new SelectList(db.Users, "Id", "StaffName", claim.StaffId);
     return(View(claim));
 }
示例#3
0
 public void Update(ClaimInfor claimInfor)
 {
     db.Entry(claimInfor).State = EntityState.Modified;
     db.SaveChanges();
 }
示例#4
0
 public void Update(Staff staff)
 {
     db.Entry(staff).State = EntityState.Modified;
     db.SaveChanges();
 }