Пример #1
0
        public async Task <IActionResult> Edit(int id, [Bind("PdlBoradForm6RecNo,NameDesignation,StaffMeeting,OfficeWorkBillWork,AuditWork,PucWork,PensionCertificationWork,OtherDuty,GovtHoliday,LeaveAvailed,TotalDays")] PdlBoardForm6 pdlBoardForm6)
        {
            if (id != pdlBoardForm6.PdlBoradForm6RecNo)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(pdlBoardForm6);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!PdlBoardForm6Exists(pdlBoardForm6.PdlBoradForm6RecNo))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(pdlBoardForm6));
        }
Пример #2
0
        public async Task <IActionResult> Edit(int id, [Bind("UserName,Password,Id")] Login login)
        {
            if (id != login.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(login);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!LoginExists(login.Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(login));
        }
Пример #3
0
        public async Task <IActionResult> InstitutionsEdit(int id, [Bind("InstitutionsRecNo,District,InstitutionsCategory,InstitutionsName,InstitutionsDetails,Contact,EmaiId")] TblMasterInstitutions oTblMasterInstitutions)
        {
            if (id != oTblMasterInstitutions.InstitutionsRecNo)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(oTblMasterInstitutions);
                    var result = await _context.SaveChangesAsync();

                    if (result == 1)
                    {
                        Result          = "Updated";
                        ViewData["Msg"] = new MessageDTO {
                            Message = "Dear User,<br/>Details Successfully Updated!!.", 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"
                        };
                    }
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!TblMasterInstitutionsExists(oTblMasterInstitutions.InstitutionsRecNo))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                // return RedirectToAction(nameof(Index));
            }
            return(View(oTblMasterInstitutions));



            //if (ModelState.IsValid)
            //{
            //    _context.TblMasterInstitutions.Update(oTblMasterInstitutions);
            //    await _context.SaveChangesAsync();
            //    return RedirectToAction("InstitutionsDetails");
            //}
            //else
            //{
            //    return View();
            //}
        }
Пример #4
0
        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));
        }
Пример #5
0
        public async Task <IActionResult> Edit(int id, [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 (id != noonMealPdlForm13.NoonMealRecNo)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(noonMealPdlForm13);
                    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 = "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"
                        };
                    }
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!NoonMealPdlForm13Exists(noonMealPdlForm13.NoonMealRecNo))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                //return RedirectToAction(nameof(Index));
            }
            return(View(noonMealPdlForm13));
        }
Пример #6
0
        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));
        }
Пример #7
0
        public async Task <IActionResult> Edit(int id, [Bind("CommunityFormBrecNo,DistrictOffice,OfficerPersonnelsName,PostName,Grade,JoiningDate,Gender,Religion,Category,FormRecNo")] CommunityFormB communityFormB)
        {
            if (id != communityFormB.CommunityFormBrecNo)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(communityFormB);
                    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 = "CommunityA"
                        };
                    }
                    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 = "CommunityA"
                        };
                    }
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!CommunityFormBExists(communityFormB.CommunityFormBrecNo))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                //return RedirectToAction(nameof(Index));
            }
            return(View(communityFormB));
        }
Пример #8
0
        public async Task <IActionResult> Edit(int id, [Bind("Annexure3FormArecNo,AdministrativeDepartment,InstitutionDetails,Pendency2013To14,Pendency2014To15,Pendency2015To16,Pendency2016To17")] Annexure3FormA annexure3FormA)
        {
            if (id != annexure3FormA.Annexure3FormArecNo)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(annexure3FormA);
                    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 = "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"
                        };
                    }
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!Annexure3FormAExists(annexure3FormA.Annexure3FormArecNo))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
            }
            return(View(annexure3FormA));
        }
Пример #9
0
        public async Task <IActionResult> Edit(int id, [Bind("RtiPdlRecNo,Details,OriginalPetitions,Appealpetitions,OriginalAppealPetitions,Total")] RtiPdl rtiPdl)
        {
            if (id != rtiPdl.RtiPdlRecNo)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(rtiPdl);
                    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 = "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"
                        };
                    }
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!RtiPdlExists(rtiPdl.RtiPdlRecNo))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
            }
            return(View(rtiPdl));
        }
Пример #10
0
        public async Task <IActionResult> EditFinancial_Year(int FinancialYearRecNo, [Bind("FinancialYearRecNo,FinancialYear")] TblMasterFinancialyear finance)
        {
            if (ModelState.IsValid)
            {
                try
                {
                    _FinancialContext.Update(finance);
                    await _FinancialContext.SaveChangesAsync();

                    ViewData["Msg"] = new MessageDTO {
                        Message = "Dear User,<br/><b>Financial Year(" + finance.FinancialYear + ")</b> Details Successfully Updated!!.", Status = "S", BackPageAction = "Financial_Year_List", BackPageController = "Financial_Year"
                    };
                    return(View());
                }
                catch (DbUpdateConcurrencyException)
                {
                    ViewData["Msg"] = new MessageDTO {
                        Message = "Dear User,<br/><b>Unable to Update Financial Year(" + finance.FinancialYear + ")</b> Details!! and if the problem persists contact your system administrator..", Status = "E", BackPageAction = "Financial_Year_List", BackPageController = "Financial_Year"
                    };
                    ModelState.AddModelError(string.Empty, "Unable to Update. Try again, and if the problem persists contact your system administrator.");
                    return(View(finance));
                }
                catch (DataException)
                {
                    ViewData["Msg"] = new MessageDTO {
                        Message = "Dear User,<br/><b>Unable to Update Financial Year(" + finance.FinancialYear + ")</b> Details!! and if the problem persists contact your system administrator..", Status = "E", BackPageAction = "Financial_Year_List", BackPageController = "Financial_Year"
                    };
                    ModelState.AddModelError(string.Empty, "Unable to Update. Try again, and if the problem persists contact your system administrator.");
                    return(View(finance));
                }
            }
            else
            {
                return(View());
            }
        }