public int Delete(StudentsDocs entity) { int i = 0; string[] addParams = { StudentsDocs_Constant.STUDENT_DOC_ID }; i = _StudentsDocsRepository.ExecuteNonQuery(entity, addParams, StudentsDocs_Constant.SPROC_STUDENTSDOCS_DEL); return i; }
public int AddEdit(StudentsDocs entity) { int i = 0; 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.StudentDocID)) { entity.StudentDocID = Utility.GeneratorUniqueId(ID_PREFIX_CONSTANTS.STUDENTS_DOCS_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 = { StudentsDocs_Constant.STUDENT_DOC_ID, StudentsDocs_Constant.STUDENT_ID, StudentsDocs_Constant.DOC_TYPE, StudentsDocs_Constant.FILE_NAME, StudentsDocs_Constant.IMAGE, StudentsDocs_Constant.COMMENTS, StudentsDocs_Constant.CREATED_BY_ID, StudentsDocs_Constant.MODIFIED_BY_ID }; i = _StudentsDocsRepository.ExecuteNonQuery(entity, addParams, StudentsDocs_Constant.SPROC_STUDENTSDOCS_UPS); return i; }
public StudentsDocs Get(StudentsDocs entity) { string[] addParams = { StudentsDocs_Constant.STUDENT_ID }; return _StudentsDocsRepository.Get(entity, addParams, StudentsDocs_Constant.SPROC_STUDENTSDOCS_SEL); }
public object GetScalar(StudentsDocs entity) { throw new NotImplementedException(); }
public IEnumerable<StudentsDocs> GetAllDocs(StudentsDocs entity) { string[] addParams = { StudentsDocs_Constant.STUDENT_ID }; return _StudentsDocsRepository.GetAll(entity, addParams, StudentsDocs_Constant.SPROC_STUDENTSDOCS_SEL); }
public IEnumerable<StudentsDocs> GetAll(StudentsDocs entity) { User objUser = null; if (eSchoolSession.IsInSession(SessionKeys.CurrentUser)) objUser = (User)eSchoolSession.GetDirectValue(SessionKeys.CurrentUser); if (objUser != null && !string.IsNullOrEmpty(objUser.SchoolID)) entity.SchoolID = objUser.SchoolID; string[] addParams = { Constants.PAGEINDEX, Constants.PAGESIZE, Constants.SORTEXP, StudentsDocs_Constant.SCHOOL_ID }; return _StudentsDocsRepository.GetAll(entity, addParams, StudentsDocs_Constant.SPROC_STUDENTSDOCS_LSTALL); }
public ActionResult DeleteStudentDoc(string pStudentDocID, String pStudentID) { if (!string.IsNullOrEmpty(pStudentDocID)) { StudentsDocs model = new StudentsDocs(); model.StudentDocID = pStudentDocID; int i = _StudentsDocsService.Delete(model); if (i <= 0) TempData["err"] = StudentRes.MsgDeleteError; else TempData["msg"] = StudentRes.MsgDeleteSuccess; } return RedirectToAction("AddEditStudent", "Students", new { tn = "5", pStudentID = pStudentID }); }