Ejemplo n.º 1
0
        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));
        }
Ejemplo n.º 2
0
        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));
        }
Ejemplo n.º 3
0
        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));
        }
Ejemplo n.º 4
0
        // GET: NoonMealForm13
        public async Task <IActionResult> Index()
        {
            using (var _context = new auditinternalContext())
            {
                ViewBag.ListOfFinancialYear  = _context.TblMasterFinancialyear.ToList();
                ViewBag.ListOfPeriodCategory = _context.TblMasterPeriodCategory.ToList();
            }
            List <NoonMealPdlForm13> olist = new List <NoonMealPdlForm13>();
            var Data = await(from A in _context.NoonMealPdlForm13
                             join B in _context.TblMasterFinancialyear on A.FinancialYear equals B.FinancialYearRecNo
                             join C in _context.TblMasterPeriodCategory on A.PeriodCategory equals C.PeriodCategoryRecNo
                             join D in _context.TblMasterPeriod on A.Period equals D.PeriodRecNo


                             select new
            {
                NoonMealRecNo      = A.NoonMealRecNo,
                FinancialYearName  = B.FinancialYear,
                PeriodCategoryName = C.PeriodCategory,
                PeriodName         = D.PeriodName,
                Subject            = A.Subject,
                AsstDirector       = A.AsstDirector,
                Inspector          = A.Inspector,
                DeputyInspector    = A.DeputyInspector,
                AssistantInspector = A.AssistantInspector,
                JuniorAssistant    = A.JuniorAssistant,
                Typist             = A.Typist,
                RecordClerk        = A.RecordClerk,
                OfficeAssistant    = A.OfficeAssistant,
            }).ToListAsync();

            if (Data != null)
            {
                for (int i = 0; i < Data.Count; i++)
                {
                    olist.Add(new NoonMealPdlForm13()
                    {
                        NoonMealRecNo      = Data[i].NoonMealRecNo,
                        FinancialYearName  = Data[i].FinancialYearName,
                        PeriodCategoryName = Data[i].PeriodCategoryName,
                        PeriodName         = Data[i].PeriodName,
                        Subject            = Data[i].Subject,
                        AsstDirector       = Data[i].AsstDirector,
                        Inspector          = Data[i].Inspector,
                        DeputyInspector    = Data[i].DeputyInspector,
                        AssistantInspector = Data[i].AssistantInspector,
                        JuniorAssistant    = Data[i].JuniorAssistant,
                        Typist             = Data[i].Typist,
                        RecordClerk        = Data[i].RecordClerk,
                        OfficeAssistant    = Data[i].OfficeAssistant
                    }
                              );
                }
            }

            return(View(olist));


            // return View(await _context.NoonMealPdlForm13.ToListAsync());
        }
Ejemplo n.º 5
0
        // GET: NoonMealForm6/Edit/5
        public async Task <IActionResult> Edit(int id)
        {
            using (var _context = new auditinternalContext())
            {
                ViewBag.ListOfFinancialYear  = _context.TblMasterFinancialyear.ToList();
                ViewBag.ListOfPeriodCategory = _context.TblMasterPeriodCategory.ToList();
                ViewBag.ListOfInstitutions   = _context.TblMasterInstitutions.ToList();
            }
            var noonMealPdlForm6 = await _context.NoonMealPdlForm6.FindAsync(id);

            GetPeriodCategory(id);
            return(View(noonMealPdlForm6));



            //ViewBag.ListOfInstitutionName = _context.TblMasterInstitutions.Select(x => new { x.InstitutionsName, x.InstitutionsRecNo }).ToList();
            //ViewBag.ListOfFinancialYear = _context.TblMasterFinancialyear.Select(x => new { x.FinancialYear, x.FinancialYearRecNo }).ToList();
            //ViewBag.ListOfPeriodCategory = _context.TblMasterPeriodCategory.Select(x => new { x.PeriodCategory, x.PeriodCategoryRecNo }).ToList();
            //ViewBag.ListOfPeriod = _context.TblMasterPeriod.Select(x => new { x.PeriodName, x.PeriodRecNo }).ToList();

            //if (id == null)
            //{
            //    return NotFound();
            //}

            //var noonMealPdlForm6 = await _context.NoonMealPdlForm6.FindAsync(id);
            //if (noonMealPdlForm6 == null)
            //{
            //    return NotFound();
            //}
            //return View(noonMealPdlForm6);
        }
Ejemplo n.º 6
0
        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));
        }
Ejemplo n.º 7
0
 // GET: Annexure2B/Create
 public IActionResult Create()
 {
     using (var _context = new auditinternalContext())
     {
         ViewBag.ListOfFinancialYear = _context.TblMasterFinancialyear.ToList();
         return(View());
     }
 }
Ejemplo n.º 8
0
        // GET: NoonMealForm2/Create
        public IActionResult Create()
        {
            using (var _context = new auditinternalContext())
            {
                ViewBag.ListOfFinancialYear  = _context.TblMasterFinancialyear.ToList();
                ViewBag.ListOfPeriodCategory = _context.TblMasterPeriodCategory.ToList();
                ViewBag.ListOfInstitutions   = _context.TblMasterInstitutions.ToList();

                return(View());
            }
        }
Ejemplo n.º 9
0
        // GET: NoonMealForm13/Edit/5
        public async Task <IActionResult> Edit(int id)
        {
            using (var _context = new auditinternalContext())
            {
                ViewBag.ListOfFinancialYear  = _context.TblMasterFinancialyear.ToList();
                ViewBag.ListOfPeriodCategory = _context.TblMasterPeriodCategory.ToList();
            }
            var noonMealPdlForm13 = await _context.NoonMealPdlForm13.FindAsync(id);

            GetPeriodCategory(id);
            return(View(noonMealPdlForm13));
        }
Ejemplo n.º 10
0
        // GET: AuditFormI/Create
        public IActionResult Create()
        {
            using (var _context = new auditinternalContext())
            {
                ViewBag.ListOfFinancialYear = _context.TblMasterFinancialyear.ToList();
                ViewBag.ListOfDistrict      = _context.TblMasterDistrict.ToList();
                ViewBag.ListOfInstitutions  = _context.TblMasterInstitutions.ToList();

                return(View());
            }

            //return View();
        }
Ejemplo n.º 11
0
        // GET: NoonMealForm2
        public async Task <IActionResult> Index()
        {
            using (var _context = new auditinternalContext())
            {
                ViewBag.ListOfFinancialYear  = _context.TblMasterFinancialyear.ToList();
                ViewBag.ListOfPeriodCategory = _context.TblMasterPeriodCategory.ToList();
                ViewBag.ListOfInstitutions   = _context.TblMasterInstitutions.ToList();
            }
            List <NoonMealPdlForm2> olist = new List <NoonMealPdlForm2>();
            var Data = await(from A in _context.NoonMealPdlForm2
                             join B in _context.TblMasterFinancialyear on A.FinancialYear equals B.FinancialYearRecNo
                             join C in _context.TblMasterPeriodCategory on A.PeriodCategory equals C.PeriodCategoryRecNo
                             join D in _context.TblMasterPeriod on A.Period equals D.PeriodRecNo
                             join E in _context.TblMasterInstitutions on A.InstitutionsName equals E.InstitutionsRecNo

                             select new
            {
                NoonMealRecNo      = A.NoonMealRecNo,
                InstitutionName    = E.InstitutionsName,
                FinancialYearName  = B.FinancialYear,
                PeriodCategoryName = C.PeriodCategory,
                Period             = D.PeriodName,

                TotalCenter = A.TotalCenter,
                Completed   = A.Completed,
                Pending     = A.Pending,
            }).ToListAsync();

            if (Data != null)
            {
                for (int i = 0; i < Data.Count; i++)
                {
                    olist.Add(new NoonMealPdlForm2()
                    {
                        NoonMealRecNo      = Data[i].NoonMealRecNo,
                        InstitutionName    = Data[i].InstitutionName,
                        FinancialYearName  = Data[i].FinancialYearName,
                        PeriodCategoryName = Data[i].PeriodCategoryName,
                        PeriodName         = Data[i].Period,
                        TotalCenter        = Data[i].TotalCenter,
                        Completed          = Data[i].Completed,
                        Pending            = Data[i].Pending
                    }
                              );
                }
            }

            return(View(olist));

            // return View(await _context.NoonMealPdlForm2.ToListAsync());
        }
Ejemplo n.º 12
0
        // GET: Annexure2B/Edit/5
        public async Task <IActionResult> Edit(int?id)
        {
            using (var _context = new auditinternalContext())
            {
                ViewBag.ListOfFinancialYear = _context.TblMasterFinancialyear.ToList();
            }
            var annexure2FormB = await _context.Annexure2FormB.FindAsync(id);

            if (annexure2FormB == null)
            {
                return(NotFound());
            }
            return(View(annexure2FormB));
        }
Ejemplo n.º 13
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));
        }
Ejemplo n.º 14
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));
        }
Ejemplo n.º 15
0
        // GET: AuditForm1a
        public async Task <IActionResult> Index()
        {
            using (var _context = new auditinternalContext())
            {
                ViewBag.ListOfFinancialYear = _context.TblMasterFinancialyear.ToList();
                ViewBag.ListOfDistrict      = _context.TblMasterDistrict.ToList();
                ViewBag.ListOfInstitutions  = _context.TblMasterInstitutions.ToList();
            }
            List <AuditPdlForm1a> olist = new List <AuditPdlForm1a>();
            var Data = await(from A in _context.AuditPdlForm1a
                             join B in _context.TblMasterFinancialyear on A.FinancialYear equals B.FinancialYearRecNo
                             join C in _context.TblMasterDistrict on A.District equals C.DistrictRecNo
                             join D in _context.TblMasterInstitutions on A.Institutions equals D.InstitutionsRecNo

                             select new
            {
                AuditPdlForm1ArecNo    = A.AuditPdlForm1ArecNo,
                InstitutionName        = D.InstitutionsName,
                FinancialYearName      = B.FinancialYear,
                DistrictName           = C.DistrictName,
                NoOfInstitutions       = A.NoOfInstitutions,
                InstPendingPrevMonth   = A.InstPendingPrevMonth,
                InstCompletedThisMonth = A.InstCompletedThisMonth,
                InstPendingEndMonth    = A.InstPendingEndMonth
            }).ToListAsync();

            if (Data != null)
            {
                for (int i = 0; i < Data.Count; i++)
                {
                    olist.Add(new AuditPdlForm1a()
                    {
                        AuditPdlForm1ArecNo    = Data[i].AuditPdlForm1ArecNo,
                        InstitutionName        = Data[i].InstitutionName,
                        FinancialYearName      = Data[i].FinancialYearName,
                        DistrictName           = Data[i].DistrictName,
                        NoOfInstitutions       = Data[i].NoOfInstitutions,
                        InstPendingPrevMonth   = Data[i].InstPendingPrevMonth,
                        InstCompletedThisMonth = Data[i].InstCompletedThisMonth,
                        InstPendingEndMonth    = Data[i].InstPendingEndMonth
                    }
                              );
                }
            }

            return(View(olist));
            // return View(await _context.AuditPdlForm1a.ToListAsync());
        }
Ejemplo n.º 16
0
        // GET: AuditFormI/Edit/5
        public async Task <IActionResult> Edit(int id)
        {
            using (var _context = new auditinternalContext())
            {
                ViewBag.ListOfFinancialYear = _context.TblMasterFinancialyear.ToList();
                ViewBag.ListOfDistrict      = _context.TblMasterDistrict.ToList();
                ViewBag.ListOfInstitutions  = _context.TblMasterInstitutions.ToList();
            }

            var auditPdlFormI = await _context.AuditPdlFormI.FindAsync(id);

            if (auditPdlFormI == null)
            {
                return(NotFound());
            }
            return(View(auditPdlFormI));
        }
Ejemplo n.º 17
0
        // GET: AuditFormI
        public async Task <IActionResult> Index()
        {
            using (var _context = new auditinternalContext())
            {
                ViewBag.ListOfFinancialYear = _context.TblMasterFinancialyear.ToList();
                ViewBag.ListOfDistrict      = _context.TblMasterDistrict.ToList();
                ViewBag.ListOfInstitutions  = _context.TblMasterInstitutions.ToList();
            }
            List <AuditPdlFormI> olist = new List <AuditPdlFormI>();
            var Data = await(from A in _context.AuditPdlFormI
                             join B in _context.TblMasterFinancialyear on A.FinancialYear equals B.FinancialYearRecNo
                             join C in _context.TblMasterDistrict on A.District equals C.DistrictRecNo
                             join D in _context.TblMasterInstitutions on A.Institutions equals D.InstitutionsRecNo

                             select new
            {
                AuditPdlFormIrecNo       = A.AuditPdlFormIrecNo,
                InstitutionName          = D.InstitutionsName,
                FinancialYearName        = B.FinancialYear,
                DistrictName             = C.DistrictName,
                CentreInstitutionDetails = A.CentreInstitutionDetails,
                PendencyReasons          = A.PendencyReasons
            }).ToListAsync();

            if (Data != null)
            {
                for (int i = 0; i < Data.Count; i++)
                {
                    olist.Add(new AuditPdlFormI()
                    {
                        AuditPdlFormIrecNo       = Data[i].AuditPdlFormIrecNo,
                        InstitutionName          = Data[i].InstitutionName,
                        FinancialYearName        = Data[i].FinancialYearName,
                        DistrictName             = Data[i].DistrictName,
                        CentreInstitutionDetails = Data[i].CentreInstitutionDetails,
                        PendencyReasons          = Data[i].PendencyReasons
                    }
                              );
                }
            }

            return(View(olist));
        }
Ejemplo n.º 18
0
        // GET: NoonMealForm6/Create
        public IActionResult Create()
        {
            using (var _context = new auditinternalContext())
            {
                ViewBag.ListOfFinancialYear  = _context.TblMasterFinancialyear.ToList();
                ViewBag.ListOfPeriodCategory = _context.TblMasterPeriodCategory.ToList();
                ViewBag.ListOfInstitutions   = _context.TblMasterInstitutions.ToList();

                return(View());
            }



            //ViewBag.ListOfInstitutionName = _context.TblMasterInstitutions.Select(x => new { x.InstitutionsName, x.InstitutionsRecNo }).ToList();
            //ViewBag.ListOfFinancialYear = _context.TblMasterFinancialyear.Select(x => new { x.FinancialYear, x.FinancialYearRecNo }).ToList();
            //ViewBag.ListOfPeriodCategory = _context.TblMasterPeriodCategory.Select(x => new { x.PeriodCategory, x.PeriodCategoryRecNo }).ToList();
            //ViewBag.ListOfPeriod = _context.TblMasterPeriod.Select(x => new { x.PeriodName, x.PeriodRecNo }).ToList();

            //return View();
        }
Ejemplo n.º 19
0
        // GET: Annexure4B
        public async Task <IActionResult> Index()
        {
            using (var _context = new auditinternalContext())
            {
                ViewBag.ListOfFinancialYear = _context.TblMasterFinancialyear.ToList();
                ViewBag.ListOfInstitutions  = _context.TblMasterInstitutions.ToList();
            }
            List <Annexure4FormB> olist = new List <Annexure4FormB>();
            var Data = await(from A in _context.Annexure4FormB
                             join B in _context.TblMasterFinancialyear on A.FinancialYear equals B.FinancialYearRecNo
                             join C in _context.TblMasterInstitutions on A.Institutions equals C.InstitutionsRecNo

                             select new
            {
                Annexure4FormBrecNo = A.Annexure4FormBrecNo,
                FinancialYearName   = B.FinancialYear,
                InstitutionName     = C.InstitutionsName,
                AuditFees           = A.AuditFees
            }).ToListAsync();

            if (Data != null)
            {
                for (int i = 0; i < Data.Count; i++)
                {
                    olist.Add(new Annexure4FormB()
                    {
                        Annexure4FormBrecNo = Data[i].Annexure4FormBrecNo,
                        FinancialYearName   = Data[i].FinancialYearName,
                        InstitutionName     = Data[i].InstitutionName,
                        AuditFees           = Data[i].AuditFees
                    }
                              );
                }
            }

            return(View(olist));



            //return View(await _context.Annexure4FormB.ToListAsync());
        }
Ejemplo n.º 20
0
        // GET: Annexure1A
        public async Task <IActionResult> Index()
        {
            using (var _context = new auditinternalContext())
            {
                ViewBag.ListOfFinancialYear = _context.TblMasterFinancialyear.ToList();
                ViewBag.ListOfDistrict      = _context.TblMasterDistrict.ToList();
            }
            List <Annexure1FormA> olist = new List <Annexure1FormA>();
            var Data = await(from A in _context.Annexure1FormA
                             join B in _context.TblMasterFinancialyear on A.FinancialYear equals B.FinancialYearRecNo
                             join C in _context.TblMasterDistrict on A.District equals C.DistrictRecNo


                             select new
            {
                Annexure1FormArecNo    = A.Annexure1FormArecNo,
                FinancialYearName      = B.FinancialYear,
                DistrictName           = C.DistrictName,
                AgricultureExtenCentre = A.AgricultureExtenCentre,
                PendencyDetail         = A.PendencyDetail,
            }).ToListAsync();

            if (Data != null)
            {
                for (int i = 0; i < Data.Count; i++)
                {
                    olist.Add(new Annexure1FormA()
                    {
                        Annexure1FormArecNo    = Data[i].Annexure1FormArecNo,
                        FinancialYearName      = Data[i].FinancialYearName,
                        DistrictName           = Data[i].DistrictName,
                        AgricultureExtenCentre = Data[i].AgricultureExtenCentre,
                        PendencyDetail         = Data[i].PendencyDetail
                    }
                              );
                }
            }

            return(View(olist));
        }
Ejemplo n.º 21
0
        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);
        }
Ejemplo n.º 22
0
 public CommunityBController(auditinternalContext context)
 {
     _context = context;
 }
Ejemplo n.º 23
0
 public NoonMealForm6Controller(auditinternalContext context)
 {
     _context = context;
 }
Ejemplo n.º 24
0
 public RtiPdlsController(auditinternalContext context)
 {
     _context = context;
 }
Ejemplo n.º 25
0
 public AuditFormIController(auditinternalContext context)
 {
     _context = context;
 }
Ejemplo n.º 26
0
 public LoginController(auditinternalContext context)
 {
     _context = context;
 }
Ejemplo n.º 27
0
 public InstitutionsController(auditinternalContext context)
 {
     _context = context;
 }
Ejemplo n.º 28
0
 public Annexure3AController(auditinternalContext context)
 {
     _context = context;
 }
Ejemplo n.º 29
0
 public PdlBoard6Controller(auditinternalContext context)
 {
     _context = context;
 }
Ejemplo n.º 30
0
 public Financial_YearController(auditinternalContext context)
 {
     _FinancialContext = context;
 }