public ActionResult MIdLevelEdit([Bind(Include = "CustomerId,EmployeeMIId,EmployeeCode,NhisNo,NhisProvider,BloodGroup,BloodGenotype,CreatedDate,IsDeleted")] EmployeeMI employeeMI) { try { if (ModelState.IsValid) { employeeMI.EmployeeMIId = (from a in db.EmployeeMIs where a.EmployeeCode == employeeMI.EmployeeCode select a.EmployeeMIId).FirstOrDefault(); employeeMI.CreatedDate = DateTime.Now; employeeMI.IsDeleted = false; db.Entry(employeeMI).State = EntityState.Modified; db.SaveChanges(); ViewBag.EmployeeCode = new SelectList(db.EmployeeGIs, "EmployeeCode", "EmployeeCode", employeeMI.EmployeeCode); TempData["successmsg"] = "Record is Successfully Updated"; TempData["msg"] = ""; int empcode = Convert.ToInt32(@Session["employeecode"]); DateTime dttoday = DateTime.Now.Date; var Role = (from a in db.UserMasters where a.EmployeeCode == empcode select a.RoleId).FirstOrDefault(); var RoleName = (from b in db.RoleMasters where b.RoleId == Role select b.RoleName).FirstOrDefault(); return(RedirectToAction("MidLevelIndex")); //if (RoleName == "Admin" || RoleName == "Super Admin") //{ // return RedirectToAction("Index"); //} //else if (RoleName == "Mid Level Admin") //{ // return RedirectToAction("MidLevelIndex"); //} //else if (RoleName == "Low Level Admin") //{ // return RedirectToAction("MidLevelIndex"); //} //else //{ // return RedirectToAction("UserIndex"); //} } } catch (Exception ext) { TempData["successmsg"] = ""; TempData["msg"] = "Record is not Updated,Try again"; } return(View(employeeMI)); }
public ActionResult Edit(EmployeeGI tenent) { if (ModelState.IsValid) { var tenentUpdate = db.EmployeeGIs.Find(tenent.EmployeeCode); tenentUpdate.First_Name = tenent.First_Name; tenentUpdate.Surname = tenent.Surname; tenentUpdate.Sex = tenent.Sex; tenentUpdate.DateOfBirth = tenent.DateOfBirth; tenentUpdate.Maiden_Name = tenent.Maiden_Name; tenentUpdate.Middle_Name = tenent.Middle_Name; tenentUpdate.Title = tenent.Title; tenentUpdate.StateOfOrigin = tenent.StateOfOrigin; tenentUpdate.LGA = tenent.LGA; tenentUpdate.Religion = tenent.Religion; tenentUpdate.DateOfRetirement = tenent.DateOfRetirement; tenentUpdate.EmployeeCode = tenent.EmployeeCode; tenentUpdate.Unit_Research = tenent.Unit_Research; tenentUpdate.Section = tenent.Section; tenentUpdate.StationOfDeployment = tenent.StationOfDeployment; tenentUpdate.File_No = tenent.File_No; tenentUpdate.Grade_Level = tenent.Grade_Level; tenentUpdate.Step = tenent.Step; tenentUpdate.Cadre = tenent.Cadre; tenentUpdate.Marital_Status = tenent.Marital_Status; tenentUpdate.PlaceOfBirth = tenent.PlaceOfBirth; tenentUpdate.Home_Town = tenent.Home_Town; tenentUpdate.ContactHomeAddress = tenent.ContactHomeAddress; tenentUpdate.FirstAppointmentDate = tenent.FirstAppointmentDate; tenentUpdate.FirstAppointmentLocation = tenent.FirstAppointmentLocation; tenentUpdate.ConfirmationDate = tenent.ConfirmationDate; tenentUpdate.LastPromotionDate = tenent.LastPromotionDate; tenentUpdate.Rank = tenent.Rank; db.Entry(tenentUpdate).State = EntityState.Modified; var customerUpdate = db.CustomerMasters.Find(tenentUpdate.CustomerId); customerUpdate.ContactPerson = tenent.CustomerMaster.ContactPerson = (tenent.First_Name + " " + tenent.Middle_Name + " " + tenent.Surname).Trim(); customerUpdate.OrgLogoUrl = tenent.CustomerMaster.OrgLogoUrl; customerUpdate.CountryLogoIrl = tenent.CustomerMaster.CountryLogoIrl; customerUpdate.OrgName = tenent.CustomerMaster.OrgName; customerUpdate.Email = tenent.CustomerMaster.Email; customerUpdate.Address = tenent.CustomerMaster.Address; customerUpdate.PhoneNumber = tenent.CustomerMaster.PhoneNumber; SaveImages(customerUpdate); db.Entry(customerUpdate).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(tenent)); }
public ActionResult Edit([Bind(Include = "CustomerId,EmployeeSIId,EmployeeCode,CurrentPosting,BankType,NameOfBanks,BankBranch,AccountType,AccountNumber,AccountName,PFA,RSAPinNo,SalaryScale,CreatedDate,IsDeleted")] EmployeeSI employeeSI) { try { if (ModelState.IsValid) { employeeSI.EmployeeSIId = (from a in db.EmployeeSIs where a.EmployeeCode == employeeSI.EmployeeCode select a.EmployeeSIId).FirstOrDefault(); employeeSI.CreatedDate = DateTime.Now; employeeSI.IsDeleted = false; db.Entry(employeeSI).State = EntityState.Modified; db.SaveChanges(); TempData["successmsg"] = "Record is Successfully Updated"; TempData["msg"] = ""; int empcode = Convert.ToInt32(@Session["employeecode"]); DateTime dttoday = DateTime.Now.Date; var Role = (from a in db.UserMasters where a.EmployeeCode == empcode select a.RoleId).FirstOrDefault(); var RoleName = (from b in db.RoleMasters where b.RoleId == Role select b.RoleName).FirstOrDefault(); if (RoleName == "Admin" || RoleName == "Super Admin") { return(RedirectToAction("Index")); } else if (RoleName == "Mid Level Admin") { return(RedirectToAction("MidLevelIndex")); } else if (RoleName == "Low Level Admin") { return(RedirectToAction("MidLevelIndex")); } else { return(RedirectToAction("UserIndex")); } } } catch (Exception ext) { TempData["successmsg"] = ""; TempData["msg"] = "Record is not Updated"; } ViewBag.EmployeeCode = new SelectList(db.EmployeeGIs, "EmployeeCode", "EmployeeCode", employeeSI.EmployeeCode); return(View(employeeSI)); }
public ActionResult Edit([Bind(Include = "CustomerId,EmployeePIId,EmployeeCode,EmpEmailId,PermanentAddress,MobileNo,EmailIdKin,KinName,AddressNextOfKin,StateNextOfKin,LGAextOfKin,Relation,PhoneNoNextOfKin,NameOfStaffBenificiary,PhoneOfStaffBenificiary,AddressOfStaffBenificiary,EmployeeStatus,CreatedDate,IsDeleted")] EmployeePI employeePI) { try { if (ModelState.IsValid) { employeePI.EmployeePIId = (from a in db.EmployeePIs where a.EmployeeCode == employeePI.EmployeeCode select a.EmployeePIId).FirstOrDefault(); employeePI.CreatedDate = DateTime.Now; employeePI.IsDeleted = false; db.Entry(employeePI).State = EntityState.Modified; db.SaveChanges(); TempData["successmsg"] = "Record is Successfully Updated"; TempData["msg"] = ""; int empcode = Convert.ToInt32(@Session["employeecode"]); DateTime dttoday = DateTime.Now.Date; var Role = (from a in db.UserMasters where a.EmployeeCode == empcode select a.RoleId).FirstOrDefault(); var RoleName = (from b in db.RoleMasters where b.RoleId == Role select b.RoleName).FirstOrDefault(); if (RoleName == "Admin" || RoleName == "Super Admin") { return(RedirectToAction("Index")); } else if (RoleName == "Mid Level Admin") { return(RedirectToAction("MidLevelIndex")); } else if (RoleName == "Low Level Admin") { return(RedirectToAction("MidLevelIndex")); } else { return(RedirectToAction("UserIndex")); } } } catch (Exception ext) { TempData["msg"] = "Record is not Updated,Try again"; TempData["successmsg"] = ""; } ViewBag.EmployeeCode = new SelectList(db.EmployeeGIs, "EmployeeCode", "EmployeeCode", employeePI.EmployeeCode); return(View(employeePI)); }
public ActionResult Edit([Bind(Include = "LeaveTypeId,LeaveTypeName,IsActive,IsDeleted,CreatedDate")] LeaveTypeMaster leaveTypeMaster) { if (ModelState.IsValid) { db.Entry(leaveTypeMaster).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(leaveTypeMaster)); }
public ActionResult Edit([Bind(Include = "CustomerId,LeaveId,LeaveTypeId,LeaveCount,CalenderYear,IsActive,IsDelete,IsCreated")] LeaveMaster leaveMaster) { if (ModelState.IsValid) { db.Entry(leaveMaster).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(leaveMaster)); }
public ActionResult Edit([Bind(Include = "CustomerId,ConferenceId,EmployeeCode,Name,Title,AttendedDate,CreatedDate,IsDeleted")] EmpAIConference empAIConference) { if (ModelState.IsValid) { db.Entry(empAIConference).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(empAIConference)); }
public ActionResult Edit([Bind(Include = "CustomerId,LeaveLogId,EmployeeCode,LeaveType,ConsumedLeaves,BalanceLeaves,FiscalYear")] LeaveLedger leaveLedger) { if (ModelState.IsValid) { db.Entry(leaveLedger).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(leaveLedger)); }
public ActionResult Edit([Bind(Include = "CustomerId,BankTypeId,BankTypeName,CreatedDate,IsDeleted")] BankTypeMaster bankTypeMaster) { if (ModelState.IsValid) { db.Entry(bankTypeMaster).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(bankTypeMaster)); }
public ActionResult Edit([Bind(Include = "ProgrammeId,ProgrammeName,CreatedDate,IsDeleted")] ProgrammeMaster programmeMaster) { if (ModelState.IsValid) { db.Entry(programmeMaster).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(programmeMaster)); }
public ActionResult Edit([Bind(Include = "Id,Item,Class,Price,CreatedDate,IsDeleted,CustomerId")] ChemicalStore chemicalStore) { if (ModelState.IsValid) { db.Entry(chemicalStore).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(chemicalStore)); }
public ActionResult Edit([Bind(Include = "RankId,RankName,RankDescription,CreatedDate,IsDeleted")] RankMaster rankMaster) { if (ModelState.IsValid) { db.Entry(rankMaster).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(rankMaster)); }
public ActionResult Edit([Bind(Include = "CustomerId,Id,CompanyName,ProjectTitle,LotNo,ContractorName,EvidofReg_Cac,TaxClearanceCertificate,EvidofReg_Bureau,AudittedAccount,ClearanceCert_Itf,ClearanceCert_Pencom,ClearanceCert_Nsitf,StaffStrength,CurrentFinStatus,EquipmentList,EvidPreSimJob,ExpCompt,FinalScore,CreatedDate,IsDeleted")] PrequalificationScoring prequalificationScoring) { if (ModelState.IsValid) { db.Entry(prequalificationScoring).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(prequalificationScoring)); }
public ActionResult Edit([Bind(Include = "AllowanceId,AllowanceType,ValueMethod,AllowanceHead,AllowanceAmount,IsActive,IsCreated,CreatedDate,CustomerId")] AllowanceMaster allowanceMaster) { if (ModelState.IsValid) { db.Entry(allowanceMaster).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(allowanceMaster)); }
public ActionResult Edit([Bind(Include = "CustomerId,UnitResearchId,UnitResearchName,CreatedDate,IsDeleted")] UnitResearchMaster unitResearchMaster) { if (ModelState.IsValid) { db.Entry(unitResearchMaster).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(unitResearchMaster)); }
public ActionResult Edit([Bind(Include = "CustomerId,QualificationId,QualificationName,Duration,CreatedDate,IsDeleted")] QualificationMaster qualificationMaster) { if (ModelState.IsValid) { db.Entry(qualificationMaster).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(qualificationMaster)); }
public ActionResult Edit([Bind(Include = "CustomerId,RoleId,RoleName,Description,IsActive,IsDeleted,CreatedDate")] RoleMaster roleMaster) { if (ModelState.IsValid) { db.Entry(roleMaster).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(roleMaster)); }
public ActionResult Edit([Bind(Include = "SalaryScaleId,SalaryScale,GradeLevel,Step,SalaryAmount,IsActive,IsDeleted,ScaleYear,CreatedDate")] SalaryStructureMaster salaryStructureMaster) { if (ModelState.IsValid) { db.Entry(salaryStructureMaster).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(salaryStructureMaster)); }
public ActionResult Edit([Bind(Include = "StationId,StationName,CreatedDate,IsDeleted")] StationMaster stationMaster) { if (ModelState.IsValid) { db.Entry(stationMaster).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(stationMaster)); }
public ActionResult Edit([Bind(Include = "SalaryPaymId,EmployeeCode,SalaryAmount,Month,Year,DeductionAmount,AllowanceAmount,OtherDeduction,OtherAllowance,PaymentDate,IsPaid,IsSalarySlipPrint,IsDeleted,CreatedDate")] SalaryPayment salaryPayment) { if (ModelState.IsValid) { db.Entry(salaryPayment).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(salaryPayment)); }
public ActionResult Edit([Bind(Include = "CustomerId,DeductionId,DeductionType,ValueMethod,DeductionHead,DeductionAmount,IsActive,IsCreated,CreatedDate")] DeductionsMaster deductionsMaster) { if (ModelState.IsValid) { db.Entry(deductionsMaster).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(deductionsMaster)); }
public ActionResult Edit([Bind(Include = "AssociationsId,EmployeeCode,Title,IDnumber,AttendedDate,CreatedDate,IsDeleted")] EmpAIAssociation empAIAssociation) { if (ModelState.IsValid) { db.Entry(empAIAssociation).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(empAIAssociation)); }
public ActionResult Edit([Bind(Include = "Id,City,StateId,IsDeleted,CustomerId")] CityMaster cityMaster) { if (ModelState.IsValid) { db.Entry(cityMaster).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(cityMaster)); }
public ActionResult Edit([Bind(Include = "UnitServicesId,UnitServicesName,CreatedDate,IsDeleted")] UnitServicesMaster unitServicesMaster) { if (ModelState.IsValid) { unitServicesMaster.CreatedDate = DateTime.Now; db.Entry(unitServicesMaster).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(unitServicesMaster)); }
public ActionResult Edit([Bind(Include = "CustomerId,Id,RepresentativeName,CompanyName,AmountQuoted,CompletionPeriodFrom,CompletionPeriodTo,Remarks,LotNo,ProjectTitle,YearofProject,CreatedDate,IsDeleted")] TenderOpening tenderOpening) { if (ModelState.IsValid) { tenderOpening.CreatedDate = DateTime.Now; db.Entry(tenderOpening).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(tenderOpening)); }
public ActionResult Edit([Bind(Include = "Id,CompanyName,LotNo,ProjectTitle,RepresentativeName,PhoneNo,SubmissionDate,YearofProject,CreatedDate,IsDeleted")] TendererInformation tendererInformation) { if (ModelState.IsValid) { tendererInformation.CreatedDate = DateTime.Now; db.Entry(tendererInformation).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(tendererInformation)); }
public ActionResult Edit([Bind(Include = "Id,EmployeeCode,Surname,OtherNames,Faculty,Department,Maritalstatus,Nationality,PhoneNo,Fileno,PresentStatus,Salaryperannum,Proposedannualleave,LeavefromDate,LeavetoDate,Totalworkingday,IsLeave,IsLeavefromDate,IsLeavetoDate,OutstandingLeaveDays,IsPublicService,IsHOD,ActOfficer,IApprove,IsDeleted,CreatedDate,CustomerId")] AnnualLeave annualLeave) { if (ModelState.IsValid) { db.Entry(annualLeave).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.EmployeeCode = new SelectList(db.EmployeeGIs, "EmployeeCode", "Rank", annualLeave.EmployeeCode); ViewBag.EmployeeCode = new SelectList(db.EmployeeGIs, "EmployeeCode", "Rank", annualLeave.EmployeeCode); return(View(annualLeave)); }
public ActionResult Edit([Bind(Include = "Id,EmployeeCode,Name,Department,Post,FromDate,ToDate,Reason,ResponsiblePerson,HodComment,AnyLeaveDays,OfficeInChargeName,ApprovedDays,CreatedDate,IsDeleted,CustomerId")] CasualLeave casualLeave) { if (ModelState.IsValid) { db.Entry(casualLeave).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.EmployeeCode = new SelectList(db.EmployeeGIs, "EmployeeCode", "Rank", casualLeave.EmployeeCode); ViewBag.EmployeeCode = new SelectList(db.EmployeeGIs, "EmployeeCode", "Rank", casualLeave.EmployeeCode); return(View(casualLeave)); }
public ActionResult Edit([Bind(Include = "Id,EmployeeCode,OurRef,YourRef,Date,Name,NYSC_Code,EffectDate,BankAccountNo,CreatedDate,IsDeleted")] NyscFinalClearance nyscFinalClearance) { if (ModelState.IsValid) { db.Entry(nyscFinalClearance).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.EmployeeCode = new SelectList(db.EmployeeGIs, "EmployeeCode", "Rank", nyscFinalClearance.EmployeeCode); ViewBag.EmployeeCode = new SelectList(db.EmployeeGIs, "EmployeeCode", "Rank", nyscFinalClearance.EmployeeCode); return(View(nyscFinalClearance)); }
public ActionResult Edit([Bind(Include = "CustomerId,Id,EmployeeCode,OurRef,YourRef,Date,Name,LetterDated,FromDate,ToDate,OfficerInCharge,PrincipalAccountant,ReinstatePayment,PaymentToDate,PaymentFromDate,CreatedDate,IsDeleted")] GraduateAttachmentForm graduateAttachmentForm) { if (ModelState.IsValid) { db.Entry(graduateAttachmentForm).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.EmployeeCode = new SelectList(db.EmployeeGIs, "EmployeeCode", "Rank", graduateAttachmentForm.EmployeeCode); ViewBag.EmployeeCode = new SelectList(db.EmployeeGIs, "EmployeeCode", "Rank", graduateAttachmentForm.EmployeeCode); return(View(graduateAttachmentForm)); }