public async Task <IActionResult> Create([Bind("RtiPdlRecNo,Details,OriginalPetitions,Appealpetitions,OriginalAppealPetitions,Total")] RtiPdl rtiPdl) { if (ModelState.IsValid) { _context.Add(rtiPdl); var result = await _context.SaveChangesAsync(); if (result == 1) { Result = "Saved"; ViewData["Msg"] = new MessageDTO { Message = "Dear User,<br/>Details Successfully Saved!!.", Status = "S", BackPageAction = "Index", BackPageController = "RtiPdls" }; } else { ViewData["Msg"] = new MessageDTO { Message = "Dear User,<br/><b>Some Error Ocurred Please try Later. if the problem persists contact your system administrator..", Status = "E", BackPageAction = "Index", BackPageController = "RtiPdls" }; } } return(View(rtiPdl)); //if (ModelState.IsValid) //{ // _context.Add(rtiPdl); // await _context.SaveChangesAsync(); // return RedirectToAction(nameof(Index)); //} //return View(rtiPdl); }
public async Task <IActionResult> Create([Bind("UserName,Password,Id")] Login login) { if (ModelState.IsValid) { _context.Add(login); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(login)); }
public async Task <IActionResult> Create([Bind("PdlBoradForm6RecNo,NameDesignation,StaffMeeting,OfficeWorkBillWork,AuditWork,PucWork,PensionCertificationWork,OtherDuty,GovtHoliday,LeaveAvailed,TotalDays")] PdlBoardForm6 pdlBoardForm6) { if (ModelState.IsValid) { _context.Add(pdlBoardForm6); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(pdlBoardForm6)); }
public async Task <IActionResult> Create([Bind("NoonMealRecNo,InstitutionsName,TotalCenter,Completed,Pending,CreatedBy,CreatedDate,FinancialYear,PeriodCategory,Period")] NoonMealPdlForm2 noonMealPdlForm2) { using (var _context = new auditinternalContext()) { ViewBag.ListOfFinancialYear = _context.TblMasterFinancialyear.ToList(); ViewBag.ListOfPeriodCategory = _context.TblMasterPeriodCategory.ToList(); ViewBag.ListOfInstitutions = _context.TblMasterInstitutions.ToList(); } if (ModelState.IsValid) { _context.Add(noonMealPdlForm2); var result = await _context.SaveChangesAsync(); if (result == 1) { Result = "Saved"; ViewData["Msg"] = new MessageDTO { Message = "Dear User,<br/>Details Successfully Saved!!.", Status = "S", BackPageAction = "Index", BackPageController = "NoonMealForm2" }; } else { ViewData["Msg"] = new MessageDTO { Message = "Dear User,<br/><b>Some Error Ocurred Please try Later. if the problem persists contact your system administrator..", Status = "E", BackPageAction = "Index", BackPageController = "NoonMealForm2" }; } } return(View(noonMealPdlForm2)); }
public async Task <IActionResult> Create([Bind("NoonMealRecNo,Subject,AsstDirector,Inspector,DeputyInspector,AssistantInspector,JuniorAssistant,Typist,RecordClerk,OfficeAssistant,FinancialYear,PeriodCategory,Period")] NoonMealPdlForm13 noonMealPdlForm13) { using (var _context = new auditinternalContext()) { ViewBag.ListOfFinancialYear = _context.TblMasterFinancialyear.ToList(); ViewBag.ListOfPeriodCategory = _context.TblMasterPeriodCategory.ToList(); } if (ModelState.IsValid) { _context.Add(noonMealPdlForm13); var result = await _context.SaveChangesAsync(); if (result == 1) { Result = "Saved"; ViewData["Msg"] = new MessageDTO { Message = "Dear User,<br/>Details Successfully Saved!!.", Status = "S", BackPageAction = "Index", BackPageController = "NoonMealForm13" }; } else { ViewData["Msg"] = new MessageDTO { Message = "Dear User,<br/><b>Some Error Ocurred Please try Later. if the problem persists contact your system administrator..", Status = "E", BackPageAction = "Index", BackPageController = "NoonMealForm13" }; } //return RedirectToAction(nameof(Index)); } return(View(noonMealPdlForm13)); }
public async Task <IActionResult> Create([Bind("Annexure4FormBrecNo,Institutions,FinancialYear,AuditFees")] Annexure4FormB annexure4FormB) { using (var _context = new auditinternalContext()) { ViewBag.ListOfFinancialYear = _context.TblMasterFinancialyear.ToList(); ViewBag.ListOfInstitutions = _context.TblMasterInstitutions.ToList(); } if (ModelState.IsValid) { _context.Add(annexure4FormB); var result = await _context.SaveChangesAsync(); if (result == 1) { Result = "Saved"; ViewData["Msg"] = new MessageDTO { Message = "Dear User,<br/>Details Successfully Saved!!.", Status = "S", BackPageAction = "Index", BackPageController = "Annexure4B" }; } else { ViewData["Msg"] = new MessageDTO { Message = "Dear User,<br/><b>Some Error Ocurred Please try Later. if the problem persists contact your system administrator..", Status = "E", BackPageAction = "Index", BackPageController = "Annexure4B" }; } } return(View(annexure4FormB)); }
public async Task <IActionResult> Create([Bind("AuditPdlForm1ArecNo,FinancialYear,District,Institutions,NoOfInstitutions,InstPendingPrevMonth,InstCompletedThisMonth,InstPendingEndMonth")] AuditPdlForm1a auditPdlForm1a) { using (var _context = new auditinternalContext()) { ViewBag.ListOfFinancialYear = _context.TblMasterFinancialyear.ToList(); ViewBag.ListOfDistrict = _context.TblMasterDistrict.ToList(); ViewBag.ListOfInstitutions = _context.TblMasterInstitutions.ToList(); } if (ModelState.IsValid) { _context.Add(auditPdlForm1a); var result = await _context.SaveChangesAsync(); if (result == 1) { Result = "Saved"; ViewData["Msg"] = new MessageDTO { Message = "Dear User,<br/>Details Successfully Saved!!.", Status = "S", BackPageAction = "Index", BackPageController = "AuditForm1a" }; } else { ViewData["Msg"] = new MessageDTO { Message = "Dear User,<br/><b>Some Error Ocurred Please try Later. if the problem persists contact your system administrator..", Status = "E", BackPageAction = "Index", BackPageController = "AuditForm1a" }; } } return(View(auditPdlForm1a)); }
public async Task <IActionResult> DeleteConfirmed(int id) { var noonMealPdlForm6 = await _context.NoonMealPdlForm6.FindAsync(id); _context.NoonMealPdlForm6.Remove(noonMealPdlForm6); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); }
public async Task <IActionResult> DeleteConfirmed(int id) { var auditPdlFormI = await _context.AuditPdlFormI.FindAsync(id); _context.AuditPdlFormI.Remove(auditPdlFormI); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); }
public async Task <IActionResult> DeleteConfirmed(int id) { var annexure4FormB = await _context.Annexure4FormB.FindAsync(id); _context.Annexure4FormB.Remove(annexure4FormB); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); }
public async Task <IActionResult> Financial_Year(TblMasterFinancialyear Financial)//model object Ref { await _FinancialContext.TblMasterFinancialyear.AddAsync(Financial); var result = await _FinancialContext.SaveChangesAsync(); if (result == 1) { Result = "Details are Added!!"; ViewData["Msg"] = new MessageDTO { Message = "Dear User,<br/><b>Financial Year(" + Financial.FinancialYear + ")</b> Details Successfully Saved!!.", Status = "S", BackPageAction = "Financial_Year_List", BackPageController = "Financial_Year" }; } else { ViewData["Msg"] = new MessageDTO { Message = "Dear User,<br/><b>Unable to Update Financial Year(" + Financial.FinancialYear + ")</b> Details!! and if the problem persists contact your system administrator..", Status = "E", BackPageAction = "Financial_Year_List", BackPageController = "Financial_Year" }; } return(View()); }
public async Task <IActionResult> InstitutionsCreate(TblMasterInstitutions model) { _context.TblMasterInstitutions.Add(model); var result = await _context.SaveChangesAsync(); if (result == 1) { Result = "Saved"; ViewData["Msg"] = new MessageDTO { Message = "Dear User,<br/>Details Successfully Saved!!.", Status = "S", BackPageAction = "InstitutionsDetails", BackPageController = "Institutions" }; } else { ViewData["Msg"] = new MessageDTO { Message = "Dear User,<br/><b>Some Error Ocurred Please try Later. if the problem persists contact your system administrator..", Status = "E", BackPageAction = "InstitutionsDetails", BackPageController = "Institutions" }; } return(View()); }
public async Task <IActionResult> Create([Bind("Annexure3FormArecNo,AdministrativeDepartment,InstitutionDetails,Pendency2013To14,Pendency2014To15,Pendency2015To16,Pendency2016To17")] Annexure3FormA annexure3FormA) { if (ModelState.IsValid) { _context.Add(annexure3FormA); var result = await _context.SaveChangesAsync(); if (result == 1) { Result = "Saved"; ViewData["Msg"] = new MessageDTO { Message = "Dear User,<br/>Details Successfully Saved!!.", Status = "S", BackPageAction = "Index", BackPageController = "Annexure3A" }; } else { ViewData["Msg"] = new MessageDTO { Message = "Dear User,<br/><b>Some Error Ocurred Please try Later. if the problem persists contact your system administrator..", Status = "E", BackPageAction = "Index", BackPageController = "Annexure3A" }; } } return(View(annexure3FormA)); }
public async Task <IActionResult> Create([Bind("CommunityFormBrecNo,DistrictOffice,OfficerPersonnelsName,PostName,Grade,JoiningDate,Gender,Religion,Category,FormRecNo")] CommunityFormB communityFormB) { if (ModelState.IsValid) { _context.Add(communityFormB); var result = await _context.SaveChangesAsync(); if (result == 1) { Result = "Saved"; ViewData["Msg"] = new MessageDTO { Message = "Dear User,<br/>Details Successfully Saved!!.", Status = "S", BackPageAction = "Index", BackPageController = "CommunityB" }; } else { ViewData["Msg"] = new MessageDTO { Message = "Dear User,<br/><b>Some Error Ocurred Please try Later. if the problem persists contact your system administrator..", Status = "E", BackPageAction = "Index", BackPageController = "CommunityB" }; } } return(View(communityFormB)); }
public async Task <IActionResult> Edit(int id, [Bind("NoonMealRecNo,InstitutionsName,TotalCenter,Completed,Pending,CreatedBy,CreatedDate,FinancialYear,PeriodCategory,Period")] NoonMealPdlForm6 noonMealPdlForm6) { using (var _context = new auditinternalContext()) { ViewBag.ListOfFinancialYear = _context.TblMasterFinancialyear.ToList(); ViewBag.ListOfPeriodCategory = _context.TblMasterPeriodCategory.ToList(); ViewBag.ListOfInstitutions = _context.TblMasterInstitutions.ToList(); } if (id != noonMealPdlForm6.NoonMealRecNo) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(noonMealPdlForm6); var result = await _context.SaveChangesAsync(); if (result == 1) { Result = "Updated"; ViewData["Msg"] = new MessageDTO { Message = "Dear User,<br/>Details Successfully Updated!!.", Status = "S", BackPageAction = "Index", BackPageController = "NoonMealForm6" }; } else { ViewData["Msg"] = new MessageDTO { Message = "Dear User,<br/><b>Some Error Ocurred Please try Later. if the problem persists contact your system administrator..", Status = "E", BackPageAction = "Index", BackPageController = "NoonMealForm6" }; } } catch (DbUpdateConcurrencyException) { if (!NoonMealPdlForm6Exists(noonMealPdlForm6.NoonMealRecNo)) { return(NotFound()); } else { throw; } } // return RedirectToAction(nameof(Index)); } return(View(noonMealPdlForm6)); }
public async Task <IActionResult> Edit(int id, [Bind("AuditPdlFormIrecNo,FinancialYear,District,Institutions,CentreInstitutionDetails,PendencyReasons")] AuditPdlFormI auditPdlFormI) { using (var _context = new auditinternalContext()) { ViewBag.ListOfFinancialYear = _context.TblMasterFinancialyear.ToList(); ViewBag.ListOfDistrict = _context.TblMasterDistrict.ToList(); ViewBag.ListOfInstitutions = _context.TblMasterInstitutions.ToList(); } if (id != auditPdlFormI.AuditPdlFormIrecNo) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(auditPdlFormI); var result = await _context.SaveChangesAsync(); if (result == 1) { Result = "Updated"; ViewData["Msg"] = new MessageDTO { Message = "Dear User,<br/>Details Successfully Updated!!.", Status = "S", BackPageAction = "Index", BackPageController = "AuditFormI" }; } else { ViewData["Msg"] = new MessageDTO { Message = "Dear User,<br/><b>Some Error Ocurred Please try Later. if the problem persists contact your system administrator..", Status = "E", BackPageAction = "Index", BackPageController = "AuditFormI" }; } } catch (DbUpdateConcurrencyException) { if (!AuditPdlFormIExists(auditPdlFormI.AuditPdlFormIrecNo)) { return(NotFound()); } else { throw; } } } return(View(auditPdlFormI)); }
public async Task <IActionResult> Create([Bind("AuditPdlFormIrecNo,FinancialYear,District,Institutions,CentreInstitutionDetails,PendencyReasons")] AuditPdlFormI auditPdlFormI) { using (var _context = new auditinternalContext()) { ViewBag.ListOfFinancialYear = _context.TblMasterFinancialyear.ToList(); ViewBag.ListOfDistrict = _context.TblMasterDistrict.ToList(); ViewBag.ListOfInstitutions = _context.TblMasterInstitutions.ToList(); } if (ModelState.IsValid) { _context.Add(auditPdlFormI); var result = await _context.SaveChangesAsync(); if (result == 1) { Result = "Saved"; ViewData["Msg"] = new MessageDTO { Message = "Dear User,<br/>Details Successfully Saved!!.", Status = "S", BackPageAction = "Index", BackPageController = "AuditFormI" }; } else { ViewData["Msg"] = new MessageDTO { Message = "Dear User,<br/><b>Some Error Ocurred Please try Later. if the problem persists contact your system administrator..", Status = "E", BackPageAction = "Index", BackPageController = "AuditFormI" }; } } return(View(auditPdlFormI)); //if (ModelState.IsValid) //{ // _context.Add(auditPdlFormI); // await _context.SaveChangesAsync(); // return RedirectToAction(nameof(Index)); //} //return View(auditPdlFormI); }