Пример #1
0
        public ActionResult Index()

        {
            LogSMSBusiness = Get <LogSMSBusiness>();
            var searchmodel = new LOGSMS_SEARCHBO();

            SessionManager.SetValue("TimKiemSMS", null);
            var data = LogSMSBusiness.GetDaTaByPage(null);

            return(View(data));
        }
Пример #2
0
        public JsonResult getData(int indexPage, string sortQuery, int pageSize)
        {
            LogSMSBusiness = Get <LogSMSBusiness>();
            var searchModel = SessionManager.GetValue("TimKiemSMS") as LOGSMS_SEARCHBO;

            if (!string.IsNullOrEmpty(sortQuery))
            {
                if (searchModel == null)
                {
                    searchModel = new LOGSMS_SEARCHBO();
                }
                searchModel.sortQuery = sortQuery;
                if (pageSize > 0)
                {
                    searchModel.pageSize = pageSize;
                }
                SessionManager.SetValue("TimKiemSMS", searchModel);
            }

            var data = LogSMSBusiness.GetDaTaByPage(searchModel, pageSize, indexPage);

            return(Json(data));
        }
Пример #3
0
        public JsonResult searchData(FormCollection form)
        {
            LogSMSBusiness = Get <LogSMSBusiness>();
            var searchModel = SessionManager.GetValue("TimKiemSMS") as LOGSMS_SEARCHBO;

            if (searchModel == null)
            {
                searchModel          = new LOGSMS_SEARCHBO();
                searchModel.pageSize = 20;
            }

            searchModel.NguoiNhan   = form["sea_NguoiNhan"];
            searchModel.NguoiGui    = form["sea_NguoiGui"];
            searchModel.DonViGui    = form["sea_DonViGui"];
            searchModel.DonViNhan   = form["sea_DonViNhan"];
            searchModel.SoDienThoai = form["sea_SoDienThoai"];
            searchModel.TuNgay      = form["sea_TuNgay"].ToDataTime();
            searchModel.DenNgay     = form["sea_DenNgay"].ToDataTime();
            SessionManager.SetValue("TimKiemSMS", searchModel);

            var data = LogSMSBusiness.GetDaTaByPage(searchModel, searchModel.pageSize, 1);

            return(Json(data));
        }