public ActionResult Edit([Bind(Include = "Id,FirstName,LastName,Email,Designation,Salary,HireDate,Address,City,ContactNo,AccountNo,Country,BirthDate,Gender,ProvidentFundOpted,ProvidentFundAmount,ProvidentFundPercentage,DepartmentId,ProvidentFundOptedDate,CNIC,Password,IsEmailSent")] Employee employee)
        {
            if (ModelState.IsValid)
            {
                db.Entry(employee).State = EntityState.Modified;
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(employee));
        }
예제 #2
0
 public ActionResult Edit([Bind(Include = "LoanApplyId,EmployeeId,LoanCategory,LoanMoney,NoOfInstallments,InstallmentStartDate,InstallmentEndDate,RequestDate,LoanAgreement,LoanForProperty,LoanForAutomobile")] LoanApply loanApply)
 {
     if (ModelState.IsValid)
     {
         db.Entry(loanApply).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.EmployeeId   = new SelectList(db.Employees, "Id", "FirstName", loanApply.EmployeeId);
     ViewBag.LoanCategory = new SelectList(db.LoanCategories, "Id", "Type", loanApply.LoanCategory);
     ViewBag.LoanApplyId  = new SelectList(db.LoanDocumentVerifies, "LoanId", "IsDefaulter", loanApply.LoanApplyId);
     ViewBag.LoanApplyId  = new SelectList(db.LoanRequestStatus, "LoanId", "RequestStatus", loanApply.LoanApplyId);
     return(View(loanApply));
 }