public ActionResult Edit([Bind(Include = "SerialNo,IdNo,FullName,EnglishFullName,Email,Podobi,Salary,Category,Department,JoiningDate,AccountNo,MainSalaryGrade,IncrementNo,Sex,IsFreedomFighter,IsAddiitonalDuties,IsStudentAdviser,IsDean,IsChairman,IsProvost,IsProctor,IsAssistantProctor,HasOwnTransportationMethod,IsTeacher")] Employee employee) { if (ModelState.IsValid) { var grade = from a in db.Grades where a.GradeRange.Equals(employee.MainSalaryGrade) select a; Grade orDefault = grade.FirstOrDefault(); if (orDefault != null) { int grad = orDefault.GradeNo; int increment = Int32.Parse(LanguageConverter.BanglaToEnglish(employee.IncrementNo)); var mainsalaryString = from a in db.Taxes where a.Grade.Equals(grad) && a.Scale.Equals(increment) select a; var firstOrDefault = mainsalaryString.FirstOrDefault(); if (firstOrDefault != null) { employee.Salary = firstOrDefault.MainSalary; } } db.Entry(employee).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(employee)); }
public ActionResult Edit([Bind(Include = "SerialNo,DepartmentName")] Department department) { if (ModelState.IsValid) { db.Entry(department).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(department)); }
public ActionResult Edit([Bind(Include = "SerialNo,Data")] SalaryHis salaryHis) { if (ModelState.IsValid) { db.Entry(salaryHis).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(salaryHis)); }
public ActionResult Edit([Bind(Include = "GradeNo,GradeRange")] Grade grade) { if (ModelState.IsValid) { db.Entry(grade).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(grade)); }
public ActionResult Edit([Bind(Include = "SerialNo,DutyName,AllowanceAmount")] Allowance allowance) { if (ModelState.IsValid) { db.Entry(allowance).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(allowance)); }
public ActionResult Edit([Bind(Include = "SerialNo,TitleName,Category")] Title title) { if (ModelState.IsValid) { db.Entry(title).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(title)); }
public ActionResult Edit( [Bind( Include = "SerialNo,Name,Title,JoiningDate,MainSalary,PayableMainSalary,HouseRent,MedicalAllowance,CurriculumAssitanceAllowance,AssistantProctorAllowance,DeanORChairmanOrProvostAllowance,AdditionalDutiesOrStudentAdvisorAllowance,ResearchAllowance,TelephoneAllowance,Somonnoy,Total,GPF,BF,TransportationAllowance,IncomeTax,RevenueStamp,TotalSubtraction,NeatSalary" )] Salary salary) { if (ModelState.IsValid) { db.Entry(salary).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(salary)); }