Example #1
0
        public ActionResult BonafideCertificate()
        {
            LeavingCertificateVM leavingCertificateVM = new LeavingCertificateVM();
            ClassBAL             classBAL             = new ClassBAL();

            leavingCertificateVM.Classes = from obj in classBAL.GetAll() where obj.Status == true select new SelectListItem()
            {
                Text = obj.ClassName, Value = obj.ClassId.ToString()
            };

            return(View(leavingCertificateVM));
        }
Example #2
0
        public ActionResult BonafideCertificate(FormCollection frm)
        {
            LeavingCertificateVM leavingCertificateVM = new LeavingCertificateVM();

            if (frm["RegisterId"] != null && !string.IsNullOrEmpty(frm["RegisterId"]))
            {
                leavingCertificateVM.RegisterId = Convert.ToInt32(frm["RegisterId"]);
            }
            if (frm["ClassId"] != null && !string.IsNullOrEmpty(frm["ClassId"]))
            {
                leavingCertificateVM.ClassId = Convert.ToInt32(frm["ClassId"]);
            }
            if (frm["DivisionId"] != null && !string.IsNullOrEmpty(frm["DivisionId"]))
            {
                leavingCertificateVM.DivisionId = Convert.ToInt32(frm["DivisionId"]);
            }
            if (frm["StudentId"] != null && !string.IsNullOrEmpty(frm["StudentId"]))
            {
                leavingCertificateVM.StudentId = Convert.ToInt32(frm["StudentId"]);
            }
            if (ModelState.IsValid)
            {
                PresentationLayer.Helpers.SessionHelper.ReportIndex = 1;
                PresentationLayer.Helpers.SessionHelper.StudentId   = leavingCertificateVM.StudentId;

                return(Redirect(@"~\Report.aspx"));
            }
            else
            {
                ClassBAL classBAL = new ClassBAL();
                leavingCertificateVM.Classes = from obj in classBAL.GetAll() where obj.Status == true select new SelectListItem()
                {
                    Text = obj.ClassName, Value = obj.ClassId.ToString()
                };

                return(View(leavingCertificateVM));
            }
        }
Example #3
0
        public ActionResult LeavingCertificate(FormCollection frm)
        {
            LeavingCertificateVM leavingCertificateVM = new LeavingCertificateVM();

            if (frm["RegisterId"] != null && !string.IsNullOrEmpty(frm["RegisterId"]))
            {
                leavingCertificateVM.RegisterId = Convert.ToInt32(frm["RegisterId"]);
            }

            if (frm["ClassId"] != null && !string.IsNullOrEmpty(frm["ClassId"]))
            {
                leavingCertificateVM.ClassId = Convert.ToInt32(frm["ClassId"]);
            }
            if (frm["DivisionId"] != null && !string.IsNullOrEmpty(frm["DivisionId"]))
            {
                leavingCertificateVM.DivisionId = Convert.ToInt32(frm["DivisionId"]);
            }
            if (frm["StudentId"] != null && !string.IsNullOrEmpty(frm["StudentId"]))
            {
                leavingCertificateVM.StudentId = Convert.ToInt32(frm["StudentId"]);
            }

            if (ModelState.IsValid)
            {
                PresentationLayer.Helpers.SessionHelper.ReportIndex = 0;
                PresentationLayer.Helpers.SessionHelper.StudentId   = leavingCertificateVM.StudentId;


                return(Redirect(@"~\Report.aspx"));
            }
            else
            {
                // AcademicYearBAL academicYearBAL = new AcademicYearBAL();
                //  leavingCertificateVM.AcademicYears = from obj in academicYearBAL.GetAll() select new SelectListItem() { Text = obj.AcademicYearName, Value = obj.AcademicYearId.ToString() };

                return(View(leavingCertificateVM));
            }
        }