コード例 #1
0
        public JsonResult searchData(FormCollection form)
        {
            HSCV_VANBANDIBusiness = Get <HSCV_VANBANDIBusiness>();
            var searchModel = (HSCV_VANBANDI_SEARCH)SessionManager.GetValue("VbChuaXlSearch");

            if (searchModel == null)
            {
                searchModel           = new HSCV_VANBANDI_SEARCH();
                searchModel.USER_ID   = currentUser.ID;
                searchModel.ITEM_TYPE = MODULE_CONSTANT.VANBANTRINHKY;
                searchModel.pageIndex = 1;
                searchModel.pageSize  = 20;
            }
            searchModel.SOHIEU           = string.IsNullOrEmpty(form["SOHIEU"])?"": form["SOHIEU"];
            searchModel.TRICHYEU         = string.IsNullOrEmpty(form["TRICHYEU"])?"": form["TRICHYEU"];
            searchModel.DOKHAN_ID        = form["DOKHAN_ID"].ToIntOrNULL();
            searchModel.DOUUTIEN_ID      = form["DOMAT_ID"].ToIntOrNULL();
            searchModel.LINHVUCVANBAN_ID = form["LINHVUCVANBAN_ID"].ToIntOrNULL();
            searchModel.LOAIVANBAN_ID    = form["LOAIVANBAN_ID"].ToIntOrNULL();
            searchModel.NGAYTAO_TU       = form["NGAYTAO_TU"].ToDateTime();
            searchModel.NGAYTAO_DEN      = form["NGAYTAO_DEN"].ToDateTime();
            //searchModel. = form["NGUOIKY"];
            SessionManager.SetValue("VanBanDenSearch", searchModel);
            var data = HSCV_VANBANDIBusiness.GetListProcessing(searchModel, searchModel.pageSize, 1);

            return(Json(data));
        }
コード例 #2
0
        //private THUMUC_LUUTRUBusiness THUMUC_LUUTRUBusiness;
        #region Các hàm actionresult
        public ActionResult Index()
        {
            AssignUserInfo();
            DM_DANHMUC_DATABusiness = Get <DM_DANHMUC_DATABusiness>();
            VanBanDiVM           model       = new VanBanDiVM();
            HSCV_VANBANDI_SEARCH searchModel = new HSCV_VANBANDI_SEARCH();

            model.LstDoKhan        = DM_DANHMUC_DATABusiness.DsByMaNhom(DMLOAI_CONSTANT.DOQUANTRONG, 0);
            model.LstDoUuTien      = DM_DANHMUC_DATABusiness.DsByMaNhom(DMLOAI_CONSTANT.DOUUTIEN, 0);
            model.LstLoaiVanBan    = DM_DANHMUC_DATABusiness.DsByMaNhom(DMLOAI_CONSTANT.LOAI_VANBAN, 0);
            model.LstLinhVucVanBan = DM_DANHMUC_DATABusiness.DsByMaNhom(DMLOAI_CONSTANT.LINHVUCVANBAN, 0);
            HSCV_VANBANDIBusiness  = Get <HSCV_VANBANDIBusiness>();
            searchModel.USER_ID    = currentUser.ID;
            searchModel.ITEM_TYPE  = MODULE_CONSTANT.VANBANTRINHKY;
            model.ListResult       = HSCV_VANBANDIBusiness.GetListProcessing(searchModel, MaxPerpage);
            model.UserInfoBO       = currentUser;
            searchModel.pageSize   = MaxPerpage;
            SessionManager.SetValue("VbChuaXlSearch", searchModel);
            return(View(model));
        }
コード例 #3
0
        public JsonResult getData(int indexPage, string sortQuery, int pageSize)
        {
            HSCV_VANBANDIBusiness = Get <HSCV_VANBANDIBusiness>();
            var searchModel = SessionManager.GetValue("VbChuaXlSearch") as HSCV_VANBANDI_SEARCH;

            if (!string.IsNullOrEmpty(sortQuery))
            {
                if (searchModel == null)
                {
                    searchModel = new HSCV_VANBANDI_SEARCH();
                }
                searchModel.sortQuery = sortQuery;
                if (pageSize > 0)
                {
                    searchModel.pageSize = pageSize;
                }
                SessionManager.SetValue("VbChuaXlSearch", searchModel);
            }
            var data = HSCV_VANBANDIBusiness.GetListProcessing(searchModel, pageSize, indexPage);

            return(Json(data));
        }