Пример #1
0
        public List <SelectListItem> GetCourseListItem()
        {
            CourseBL objUserBL = new CourseBL();
            List <SelectListItem> lstSelectItem = new List <SelectListItem>();

            try
            {
                CourseMaster        obj         = new CourseMaster();
                List <CourseMaster> lstUserType = objUserBL.CRUDCourses(obj, "L");

                if (lstUserType != null)
                {
                    lstSelectItem.Add(new SelectListItem {
                        Text = "Select Course", Value = ""
                    });
                    foreach (var u in lstUserType)
                    {
                        lstSelectItem.Add(new SelectListItem {
                            Text = Convert.ToString(u.CourseName), Value = Convert.ToString(u.CourseId)
                        });
                    }
                }
            }
            catch (Exception)
            {
                throw;
            }
            return(lstSelectItem);
        }
Пример #2
0
        public ActionResult AddStudentExam(long?id)
        {
            StudentsExams exam = new StudentsExams();

            exam.ListCourse   = new SelectList(GetDropdownList(objCourseBL.CRUDCourses(new CourseMaster(), "L"), "CourseName", "CourseId", "Select Course"), "Value", "Text");
            exam.ExamTimeList = new SelectList(GetDropdownList(objExamBL.CRUDExamTimes(new ExamTimes(), "L"), "ExamTime", "ExamTimesId", "Select Exam Time"), "Value", "Text");
            return(View(exam));
        }
Пример #3
0
        public ActionResult AddFees(int?id)
        {
            FeesMaster objFees = new FeesMaster();

            try
            {
                FeesMaster          obj  = new FeesMaster();
                List <CourseMaster> list = new List <CourseMaster>();
                obj.LoggedInUser = long.Parse("0" + Request.Cookies["UserId"].Value);
                obj.FeesId       = id ?? 0;
                if (id != null && id > 0)
                {
                    objFees = feesBl.CRUDFees(obj, "S").FirstOrDefault();
                }
                objFees.ListCourse = new SelectList(GetDropdownList(objCourseBL.CRUDCourses(new CourseMaster(), "L"), "CourseName", "CourseId", "Select Course"), "Value", "Text");
            }
            catch (Exception ex)
            {
            }
            return(View(objFees));
        }
Пример #4
0
        public ActionResult AddAnswers(int?id)
        {
            AnswerMaster objFees = new AnswerMaster();

            try
            {
                AnswerMaster obj = new AnswerMaster();
                obj.LoggedInUser = long.Parse("0" + Request.Cookies["UserId"].Value);
                obj.AnswerId     = id ?? 0;
                if (id != null && id > 0)
                {
                    objFees = objExamBL.CRUDAnswers(obj, "S").FirstOrDefault();
                }
                objFees.ListCourse = new SelectList(GetDropdownList(objCourseBL.CRUDCourses(new CourseMaster(), "L"), "CourseName", "CourseId", "Select Course"), "Value", "Text");
                //objFees.QuestionList = new SelectList(GetDropdownList(, "CourseName", "CourseId", "Select Course"), "Value", "Text");
            }
            catch (Exception ex)
            {
            }
            return(View(objFees));
        }