public int AddEdit(Exam entity) { entity.DateCreated = DateTime.Now; entity.DateModified = DateTime.Now; User objUser = null; if (eSchoolSession.IsInSession(SessionKeys.CurrentUser)) objUser = (User)eSchoolSession.GetDirectValue(SessionKeys.CurrentUser); if (entity != null && string.IsNullOrEmpty(entity.SchoolID)) { if (objUser != null && !string.IsNullOrEmpty(objUser.SchoolID)) entity.SchoolID = objUser.SchoolID; } if (string.IsNullOrEmpty(entity.ExamID)) { entity.ExamID = Utility.GeneratorUniqueId(ID_PREFIX_CONSTANTS.EXAM_ID_PREFIX); if (objUser != null && !string.IsNullOrEmpty(objUser.UserID)) { entity.CreatedByID = objUser.UserID; entity.ModifiedByID = objUser.UserID; } else { entity.CreatedByID = "1"; entity.ModifiedByID = "1"; } } else { if (objUser != null && !string.IsNullOrEmpty(objUser.UserID)) entity.ModifiedByID = objUser.UserID; else entity.ModifiedByID = "1"; } string[] addParams = new string[] { ExamMst_Constant.EXAM_ID, ExamMst_Constant.EXAM_NAME, ExamMst_Constant.SCHOOL_ID, ExamMst_Constant.AY_ID, ExamMst_Constant.CLASS_ID, ExamMst_Constant.ASSESSMENT_TYPE, ExamMst_Constant.EXAM_TYPE, ExamMst_Constant.EXAM_START_DATE, ExamMst_Constant.EXAM_END_DATE, ExamMst_Constant.CREATED_BY_ID, ExamMst_Constant.MODIFIED_BY_ID }; return _IExamRepository.ExecuteNonQuery(entity, addParams, ExamMst_Constant.SPROC_EXAMMST_UPS); }
public IEnumerable<Exam> GetAllForLookup(Exam obj) { string[] addParams = new string[] { ExamMst_Constant.AY_ID, ExamMst_Constant.SCHOOL_ID, ExamMst_Constant.EXAM_TYPE, ExamMst_Constant.ASSESSMENT_TYPE, ExamMst_Constant.CLASS_ID }; return _IExamRepository.GetAll(obj, addParams, ExamMst_Constant.SPROC_EXAMMST_LSTALL_FORLOOKUP); }
public IEnumerable<Exam> GetAll(Exam entity) { string[] addParams = new string[] { Constants.PAGEINDEX, Constants.PAGESIZE, Constants.SORTEXP, ExamMst_Constant.SCHOOL_ID, ExamMst_Constant.AY_ID, ExamMst_Constant.CLASS_ID, ExamMst_Constant.ASSESSMENT_TYPE, ExamMst_Constant.EXAM_TYPE }; return _IExamRepository.GetAll(entity, addParams, ExamMst_Constant.SPROC_EXAMMST_LSTALL); }
public Exam Get(Exam obj) { string[] addParams = new string[] { ExamMst_Constant.EXAM_ID }; return _IExamRepository.Get(obj, addParams, ExamMst_Constant.SPROC_EXAMMST_SEL); }
public int Delete(Exam entity) { string[] addParams = new string[] { ExamMst_Constant.EXAM_ID }; return _IExamRepository.ExecuteNonQuery(entity, addParams, ExamMst_Constant.SPROC_EXAMMST_DEL); }
public object GetScalar(Exam obj) { throw new NotImplementedException(); }