public ActionResult WorkingSchool() { School objSchoolReturn = new School(); User objUser = new User(); if (eSchoolSession.IsInSession(SessionKeys.CurrentUser)) objUser = (User)eSchoolSession.GetDirectValue(SessionKeys.CurrentUser); if (objUser != null && !string.IsNullOrEmpty(objUser.SchoolID)) { School objSchool = new School(); objSchool.SchoolID = objUser.SchoolID; objSchoolReturn = _SchoolService.Get(objSchool); } return PartialView(objSchoolReturn); }
public int UpdateLogo(School entity) { int i = 0; User objUser = null; if (eSchoolSession.IsInSession(SessionKeys.CurrentUser)) objUser = (User)eSchoolSession.GetDirectValue(SessionKeys.CurrentUser); if (objUser != null && !string.IsNullOrEmpty(objUser.UserID)) entity.ModifiedByID = objUser.UserID; else entity.ModifiedByID = "1"; string[] addParams = { School_Constant.SCHOOL_ID, School_Constant.SCHOOL_LOGO , School_Constant.CREATED_BY_ID, School_Constant.MODIFIED_BY_ID }; i = _SchoolRepository.ExecuteNonQuery(entity, addParams, School_Constant.SPROC_SCHOOLMST_UPS_LOGO); return i; }
public int AddEdit(School entity) { int i = 0; User objUser = null; if (eSchoolSession.IsInSession(SessionKeys.CurrentUser)) objUser = (User)eSchoolSession.GetDirectValue(SessionKeys.CurrentUser); if (string.IsNullOrEmpty(entity.SchoolID)) { entity.SchoolID = Utility.GeneratorUniqueId(ID_PREFIX_CONSTANTS.SCHOOL_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"; } ////Upload Image to DB //if (entity.SchoolLogoFile != null && !string.IsNullOrEmpty(entity.SchoolLogoFile.FileName) // && Utility.IsImage(entity.SchoolLogoFile)) //{ // using (MemoryStream ms = new MemoryStream()) // { // entity.SchoolLogoFile.InputStream.CopyTo(ms); // byte[] array = ms.GetBuffer(); // entity.SchoolLogo = array; // } //} string[] addParams = { School_Constant.SCHOOL_ID, School_Constant.BOARD_ID , School_Constant.SCHOOL_NAME , School_Constant.SCHOOL_CODE , School_Constant.SCHOOL_REGISTRATION_NO , School_Constant.SCHOOL_CONTACT_NO , School_Constant.SCHOOL_FAX_NO , School_Constant.SCHOOL_ADDRESS , School_Constant.SCHOOL_CONTACT_PERSON_NAME , School_Constant.SCHOOL_CONTACT_PERSON_DESIGNATION , School_Constant.SCHOOL_CONTACT_PERSON_CONTACT_NO , School_Constant.SCHOOL_CONTACT_PERSON_CELL_NO , School_Constant.SCHOOL_CONTACT_PERSON_EMAIL_ADDRESS , School_Constant.ENROLL_NO_PREFIX, School_Constant.RECEIPT_NO_PREFIX, School_Constant.SCHOOL_LOGO , School_Constant.CREATED_BY_ID, School_Constant.MODIFIED_BY_ID }; i = _SchoolRepository.ExecuteNonQuery(entity, addParams, School_Constant.SPROC_SCHOOLMST_UPS); return i; }
public object GetScalar(School entity) { throw new NotImplementedException(); }
public School GetObjectCount(School entity) { string[] addParams = { School_Constant.SCHOOL_ID }; return _SchoolRepository.Get(entity, addParams, School_Constant.SPROC_OBJECT_COUNT); }
public IEnumerable<School> GetAll(School entity) { string[] addParams = { Constants.PAGEINDEX, Constants.PAGESIZE, Constants.SORTEXP }; return _SchoolRepository.GetAll(entity, addParams, School_Constant.SPROC_SCHOOLMST_LSTALL); }
public School Get(School entity) { string[] addParams = { School_Constant.SCHOOL_ID }; return _SchoolRepository.Get(entity, addParams, School_Constant.SPROC_SCHOOLMST_SEL); }
public int DeleteLogo(School entity) { int i = 0; string[] addParams = { School_Constant.SCHOOL_ID }; i = _SchoolRepository.ExecuteNonQuery(entity, addParams, School_Constant.SPROC_SCHOOLMST_DEL_LOGO); return i; }