Example #1
0
        /*----------------------------------------------------------------------------EXAM SCHEDULE-----------------------------------------------------*/

        public string addExamSchedule(ExamSchedule examSchedule)
        {
            int id;

            try
            {
                id = objUserInfoDAL.getExamReportMappingid(examSchedule.erm_institution_id, examSchedule.erm_class_id, examSchedule.erm_section_id, examSchedule.exam_term);
                if (id == 0)
                {
                    objUserInfoDAL.addExamReportMapping(examSchedule);
                    id = objUserInfoDAL.getExamReportMappingid(examSchedule.erm_institution_id, examSchedule.erm_class_id, examSchedule.erm_section_id, examSchedule.exam_term);
                    examSchedule.erm_id = id;
                    objUserInfoDAL.addExamSchedule(examSchedule);
                    return("Success");
                }
                else
                {
                    return("User Exists");
                }
            }
            catch (Exception ex)
            {
                CubitExceptionUtility.CubitExceptionLog(ex.Message + "BAL: Error while storing Post details" + ex.StackTrace + " " + ex.InnerException, this.GetType().BaseType.Name.ToString(), DateTime.Now.ToLongTimeString(), DateTime.Now.ToLongDateString());
                return("Error");
            }
        }