コード例 #1
0
        public PartialViewResult LuuSoPhatHanh(int id)
        {
            AssignUserInfo();
            var HSCV_VANBANDIBusiness   = Get <HSCV_VANBANDIBusiness>();
            var DM_DANHMUC_DATABusiness = Get <DM_DANHMUC_DATABusiness>();
            var DM_NGUOIDUNGBusiness    = Get <DM_NGUOIDUNGBusiness>();
            var TAILIEUDINHKEMBusiness  = Get <TAILIEUDINHKEMBusiness>();
            var CCTC_THANHPHANBusiness  = Get <CCTC_THANHPHANBusiness>();
            var DmNguoiDungBusiness     = Get <DM_NGUOIDUNGBusiness>();

            recipientBusiness = Get <QL_NGUOINHAN_VANBANBusiness>();

            VanBanDiVM model = new VanBanDiVM();

            model.TreeDonVi = CCTC_THANHPHANBusiness.GetTreeLabel(currentUser);
            model.VanBan    = HSCV_VANBANDIBusiness.Find(id);

            if (!string.IsNullOrEmpty(model.VanBan.DONVINHAN_INTERNAL_ID))
            {
                model.ListDonVi = CCTC_THANHPHANBusiness.GetDataByIds(model.VanBan.DONVINHAN_INTERNAL_ID.ToListInt(','));
            }
            if (model.ListDonVi == null)
            {
                model.ListDonVi = new List <CCTC_THANHPHAN>();
            }
            model.GroupUserIdsReceiveDirectly = new List <long>();
            if (!string.IsNullOrEmpty(model.VanBan.USER_RECEIVE_DIRECTLY))
            {
                model.GroupUserIdsReceiveDirectly = model.VanBan.USER_RECEIVE_DIRECTLY.ToListLong(',');
                model.LstReceiveDirectly          = DM_NGUOIDUNGBusiness.GetDanhSachByListIds(model.GroupUserIdsReceiveDirectly);
            }
            else
            {
                model.LstReceiveDirectly = new List <SelectListItem>();
            }
            model.Recipients       = recipientBusiness.GetRecipientGroups(currentUser.DeptParentID.GetValueOrDefault());
            model.LstDoUuTien      = DM_DANHMUC_DATABusiness.DsByMaNhom(VanBanConstant.DOUUTIEN, 0, model.VanBan.DOUUTIEN_ID.HasValue ? model.VanBan.DOUUTIEN_ID.Value : 0);
            model.LstDoKhan        = DM_DANHMUC_DATABusiness.DsByMaNhom(VanBanConstant.DOQUANTRONG, 0, model.VanBan.DOKHAN_ID.HasValue ? model.VanBan.DOKHAN_ID.Value : 0);
            model.LstLinhVucVanBan = DM_DANHMUC_DATABusiness.DsByMaNhom(VanBanConstant.LINHVUCVANBAN, 0, model.VanBan.LINHVUCVANBAN_ID.HasValue ? model.VanBan.LINHVUCVANBAN_ID.Value : 0);
            model.LstLoaiVanBan    = DM_DANHMUC_DATABusiness.DsByMaNhom(VanBanConstant.LOAIVANBAN, 0, model.VanBan.LOAIVANBAN_ID.HasValue ? model.VanBan.LOAIVANBAN_ID.Value : 0);
            model.ListTaiLieu      = TAILIEUDINHKEMBusiness.GetDataByItemID(id, LOAITAILIEU.VANBAN);
            model.ListTaiLieu      = model.ListTaiLieu.Where(x => x.IS_ACTIVE == 1)
                                     .GroupBy(x => x.TAILIEU_GOC_ID).Select(x => x.FirstOrDefault())
                                     .ToList();
            model.NguoiKy               = DM_NGUOIDUNGBusiness.Find(model.VanBan.NGUOIKY_ID);
            model.LstSoVanBanDi         = DM_DANHMUC_DATABusiness.DsByMaNhomByDept(VanBanConstant.SOVANBANDI, 0, currentUser.DeptParentID.Value);
            model.CodeDocumentType      = (DM_DANHMUC_DATABusiness.Find(model.VanBan.LOAIVANBAN_ID) ?? new DM_DANHMUC_DATA()).CODE;
            model.CodePublishDepartment = (CCTC_THANHPHANBusiness.Find(currentUser.DM_PHONGBAN_ID) ?? new CCTC_THANHPHAN()).CODE;
            return(PartialView("_LuuSoPhatHanh", model));
        }
コード例 #2
0
        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.GetListProcessed(searchModel, MaxPerpage);
            model.UserInfoBO       = currentUser;
            model.HasRoleThuHoi    = currentUser.ListThaoTac.Where(x => x.MA_THAOTAC == CODE_ROLE_THUHOIVANBAN).FirstOrDefault() != null;
            searchModel.pageSize   = MaxPerpage;
            SessionManager.SetValue("VbDaXlSearch", searchModel);

            #region lấy thông tin wf
            model.STATEBEGIN = 0;
            var WF_MODULEBusiness = Get <WF_MODULEBusiness>();
            var WFMODULEObj       = WF_MODULEBusiness.repository.All().Where(x => x.MODULE_CODE == MODULE_CONSTANT.VANBANTRINHKY).FirstOrDefault();
            if (WFMODULEObj != null)
            {
                var LstWFId           = WFMODULEObj.WF_STREAM_ID.ToListInt(',');
                var WF_STREAMBusiness = Get <WF_STREAMBusiness>();
                var WF_STATEBusiness  = Get <WF_STATEBusiness>();
                var CoCauBusiness     = Get <CCTC_THANHPHANBusiness>();
                var DeptObj           = CoCauBusiness.Find(currentUser.DM_PHONGBAN_ID);
                var StreamObj         = WF_STREAMBusiness.repository.All()
                                        .Where(x => LstWFId.Contains(x.ID) && x.LEVEL_ID == DeptObj.CATEGORY).FirstOrDefault();
                var StateBegin = WF_STATEBusiness.repository.All().Where(x => StreamObj.ID == x.WF_ID && true == x.IS_START).FirstOrDefault();
                if (StateBegin != null)
                {
                    model.STATEBEGIN = StateBegin.ID;
                    var WF_PROCESSBusiness = Get <WF_PROCESSBusiness>();
                    model.STARTSTATEBYUSER = WF_PROCESSBusiness.GetState(StateBegin.ID, currentUser);
                }
            }
            #endregion
            return(View(model));
        }
コード例 #3
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));
        }