public int AddEdit(FeeConcession 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.FeeConcessionID))
            {
                entity.FeeConcessionID = Utility.GeneratorUniqueId(ID_PREFIX_CONSTANTS.FEE_CONCESSION_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 = { FeeConcession_Constant.FEE_CONCESSION_ID,
                                    FeeConcession_Constant.SCHOOL_ID,
                                    FeeConcession_Constant.AY_ID,
                                    FeeConcession_Constant.CLASS_ID,
                                    FeeConcession_Constant.SECTION_ID,
                                    FeeConcession_Constant.BATCH_ID,
                                    FeeConcession_Constant.STUDENT_ID,
                                    FeeConcession_Constant.FEE_HEAD_ID,
                                    FeeConcession_Constant.FEE_STRUCTURE_HEAD_DETAIL_ID,
                                    FeeConcession_Constant.CONCESSION_PERCENT,
                                    FeeConcession_Constant.CONCESSION_AMOUNT,
                                    FeeConcession_Constant.CREATED_BY_ID,
                                    FeeConcession_Constant.MODIFIED_BY_ID
                                    };

            i = _FeeConcessionRepository.ExecuteNonQuery(entity, addParams, FeeConcession_Constant.SPROC_FEE_CONCESSIONS_UPS);

            return i;
        }
        public int Delete(FeeConcession entity)
        {
            int i = 0;

            string[] addParams = { FeeConcession_Constant.FEE_CONCESSION_ID };
            i = _FeeConcessionRepository.ExecuteNonQuery(entity, addParams, FeeConcession_Constant.SPROC_FEE_CONCESSIONS_DEL);

            return i;
        }
        public IEnumerable<FeeConcession> GetAll(FeeConcession 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, FeeConcession_Constant.SCHOOL_ID,
                                     FeeConcession_Constant.STUDENT_NAME, FeeConcession_Constant.FEE_HEAD_ID
                                 };
            return _FeeConcessionRepository.GetAll(entity, addParams, FeeConcession_Constant.SPROC_FEE_CONCESSIONS_LSTALL);
        }
 public object GetScalar(FeeConcession entity)
 {
     throw new NotImplementedException();
 }
 public FeeConcession Get(FeeConcession entity)
 {
     string[] addParams = { FeeConcession_Constant.FEE_CONCESSION_ID };
     return _FeeConcessionRepository.Get(entity, addParams, FeeConcession_Constant.SPROC_FEE_CONCESSIONS_SEL);
 }