public int AddEdit(Enquiry 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.EnquiryID)) { entity.EnquiryID = Utility.GeneratorUniqueId(ID_PREFIX_CONSTANTS.ENQUIRY_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 = { Enquiry_Constant.ENQUIRY_ID, Enquiry_Constant.ENQUIRY_NO, Enquiry_Constant.ENQUIRY_TYPE, Enquiry_Constant.ENQUIRY_DATE, Enquiry_Constant.STUDENT_NAME, Enquiry_Constant.ADMISSION_TYPE, Enquiry_Constant.DOB, Enquiry_Constant.GENDER, Enquiry_Constant.PERMANANT_ADDRESS, Enquiry_Constant.FATHERS_NAME, Enquiry_Constant.MOTHERS_NAME, Enquiry_Constant.MOBILE, Enquiry_Constant.PHONE, Enquiry_Constant.QUALIFICATION, Enquiry_Constant.OCCUPATION, Enquiry_Constant.CAME_TO_KNOW_VIA, Enquiry_Constant.ESTATUS, Enquiry_Constant.CATEGORY, Enquiry_Constant.SCHOOL_ID, Enquiry_Constant.SESSION_ID, Enquiry_Constant.CLASS_ID, Enquiry_Constant.REMARK, Enquiry_Constant.RESPONSE, Enquiry_Constant.CREATED_BY_ID, Enquiry_Constant.MODIFIED_BY_ID }; i = _EnquiriesRepository.ExecuteNonQuery(entity, addParams, Enquiry_Constant.SPROC_ENQUIRIES_UPS); return i; }
public object GetScalar(Enquiry entity) { throw new NotImplementedException(); }
public Enquiry Get(Enquiry entity) { string[] addParams = { Enquiry_Constant.ENQUIRY_ID }; return _EnquiriesRepository.Get(entity, addParams, Enquiry_Constant.SPROC_ENQUIRIES_SEL); }
public IEnumerable<Enquiry> GetAllForLookup(Enquiry 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 = { Enquiry_Constant.SCHOOL_ID }; return _EnquiriesRepository.GetAll(entity, addParams, Enquiry_Constant.SPROC_ENQUIRIES_LSTALL_FOR_LOOKUP); }
public int Delete(Enquiry entity) { int i = 0; string[] addParams = { Enquiry_Constant.ENQUIRY_ID }; i = _EnquiriesRepository.ExecuteNonQuery(entity, addParams, Enquiry_Constant.SPROC_ENQUIRIES_DEL); return i; }