Esempio n. 1
0
 private SelectList GetLookupValues(string pLookUpName)
 {
     Lookup obj = new Lookup();
     obj.LookupType = pLookUpName;
     List<Lookup> objList = _lookupService.GetAll(obj).ToList();
     SelectList retList = new SelectList(objList, (Lookup_Constants.VALUE), Lookup_Constants.LOOKUPTEXT);
     return retList;
 }
        public ActionResult ManageFeeConcession(FeeListViewModel model)
        {
            FillManageDropdowns();

            User objUser = null;
            if (eSchoolSession.IsInSession(SessionKeys.CurrentUser))
                objUser = (User)eSchoolSession.GetDirectValue(SessionKeys.CurrentUser);

            if (model.FeeConcession == null)
            {
                model.FeeConcession = new FeeConcession();
            }

            if (!string.IsNullOrEmpty(model.FeeConcession.sort))
            {
                model.FeeConcession.SortExp = model.FeeConcession.sort + " " + model.FeeConcession.sortdir;
            }

            if (model.FeeConcession.PageSize == 0)
            {
                int PageSize = Convert.ToInt32(ConfigurationManager.AppSettings["PageSize"]);
                model.FeeConcession.PageSize = PageSize;
            }

            if (model.FeeConcession.PageIndex == 0)
            {
                model.FeeConcession.PageIndex = 1;
            }

            //Searh Criteria
            if (model != null && model.FeeConcession != null)
            {
                if (!string.IsNullOrEmpty(model.FeeConcession.SearchStudentName))
                    model.FeeConcession.StudentName = model.FeeConcession.SearchStudentName;

                if (!string.IsNullOrEmpty(model.FeeConcession.SearchFeeHeadID))
                    model.FeeConcession.FeeHeadID = model.FeeConcession.SearchFeeHeadID;
            }

            model.FeeConcessionList = new List<FeeConcession>();
            model.FeeConcession.TotalCount = 0;

            model.FeeConcessionList = _FeeConcessionService.GetAll(model.FeeConcession).ToList();
            Lookup entity = new Lookup();

            if (model.FeeConcessionList != null && model.FeeConcessionList.Count > 0)
            {
                int TotalCount = model.FeeConcessionList[0].TotalCount;
                model.FeeConcession.TotalCount = TotalCount;
            }

            return View(model);
        }
Esempio n. 3
0
        public ActionResult ManageEnquiry(EnquiryListViewModel model)
        {
            User objUser = null;
            if (eSchoolSession.IsInSession(SessionKeys.CurrentUser))
                objUser = (User)eSchoolSession.GetDirectValue(SessionKeys.CurrentUser);

            if (model.Enquiry == null)
            {
                model.Enquiry = new Enquiry();
            }

            if (!string.IsNullOrEmpty(model.Enquiry.sort))
            {
                model.Enquiry.SortExp = model.Enquiry.sort + " " + model.Enquiry.sortdir;
            }

            if (model.Enquiry.PageSize == 0)
            {
                int PageSize = Convert.ToInt32(ConfigurationManager.AppSettings["PageSize"]);
                model.Enquiry.PageSize = PageSize;
            }

            if (model.Enquiry.PageIndex == 0)
            {
                model.Enquiry.PageIndex = 1;
            }
            model.EnquiryList = new List<Enquiry>();
            model.Enquiry.TotalCount = 0;

            model.EnquiryList = _EnquiryService.GetAll(model.Enquiry).ToList();
            Lookup entity = new Lookup();

            if (model.EnquiryList != null && model.EnquiryList.Count > 0)
            {
                int TotalCount = model.EnquiryList[0].TotalCount;
                model.Enquiry.TotalCount = TotalCount;
            }

            return View(model);
        }
Esempio n. 4
0
        public ActionResult ManageBatch(BatchListViewModel model)
        {
            if (model.Batch == null)
            {
                model.Batch = new Batch();
            }

            if (!string.IsNullOrEmpty(model.Batch.sort))
            {
                model.Batch.SortExp = model.Batch.sort + " " + model.Batch.sortdir;
            }

            if (model.Batch.PageSize == 0)
            {
                int PageSize = Convert.ToInt32(ConfigurationManager.AppSettings["PageSize"]);
                model.Batch.PageSize = PageSize;
            }

            if (model.Batch.PageIndex == 0)
            {
                model.Batch.PageIndex = 1;
            }
            model.BatchList = new List<Batch>();
            model.Batch.TotalCount = 0;

            model.BatchList = _BatchService.GetAll(model.Batch).ToList();
            Lookup entity = new Lookup();

            if (model.BatchList != null && model.BatchList.Count > 0)
            {
                int TotalCount = model.BatchList[0].TotalCount;
                model.Batch.TotalCount = TotalCount;
            }

            return View(model);
        }
Esempio n. 5
0
        public ActionResult ManageSchool(SchoolListViewModel model)
        {
            User objUser = null;
            if (eSchoolSession.IsInSession(SessionKeys.CurrentUser))
                objUser = (User)eSchoolSession.GetDirectValue(SessionKeys.CurrentUser);

            if (model.School == null)
            {
                model.School = new School();
            }

            if (!string.IsNullOrEmpty(model.School.sort))
            {
                model.School.SortExp = model.School.sort + " " + model.School.sortdir;
            }

            if (model.School.PageSize == 0)
            {
                int PageSize = Convert.ToInt32(ConfigurationManager.AppSettings["PageSize"]);
                model.School.PageSize = PageSize;
            }

            if (model.School.PageIndex == 0)
            {
                model.School.PageIndex = 1;
            }
            model.SchoolList = new List<School>();
            model.School.TotalCount = 0;

            //Searh Criteria
            if (model != null && model.School != null)
            {
                if (!string.IsNullOrEmpty(model.School.SearchSchoolName))
                    model.School.SchoolName = model.School.SearchSchoolName;

                if (!string.IsNullOrEmpty(model.School.SearchSchoolCode))
                    model.School.SchoolCode = model.School.SearchSchoolCode;
            }

            model.SchoolList = _ObjService.GetAll(model.School).ToList();
            Lookup entity = new Lookup();

            if (model.SchoolList != null && model.SchoolList.Count > 0)
            {
                int TotalCount = model.SchoolList[0].TotalCount;
                model.School.TotalCount = TotalCount;
            }

            return View(model);
        }
Esempio n. 6
0
 public object GetScalar(Lookup obj)
 {
     throw new NotImplementedException();
 }
Esempio n. 7
0
 public IEnumerable<Lookup> GetAll(Lookup entity)
 {
     string[] addParams = { Lookup_Constants.LOOKUPTYPE };
     IEnumerable<Lookup> LookupList = _LookupRepositoy.GetAll(entity, addParams, Lookup_Constants.SPROC_LOOKUP_GET);
     return LookupList;
 }
Esempio n. 8
0
 public Lookup Get(Lookup obj)
 {
     throw new NotImplementedException();
 }
Esempio n. 9
0
 public int Delete(Lookup entity)
 {
     throw new NotImplementedException();
 }
Esempio n. 10
0
 public int AddEdit(Lookup entity)
 {
     throw new NotImplementedException();
 }