private SubmitBuildingModifyViewModel BuildingModifyInit(int?pageIndex) { pageIndex = pageIndex ?? 1; string pager = string.Empty; int pageSize = 14; SubmitBuildingModifyViewModel viewModel = new SubmitBuildingModifyViewModel(); DataTable houses = ElementOrganizeBLL.GetCurrentBuildingModify(); if (houses.Rows.Count == 0) { viewModel.Message = "该用户还没有分配权限,可以联系商务局相关人员询问具体情况。"; return(viewModel); } #region where Dictionary <KeyValuePair <string, RoadFlow.Data.Model.SQLFilterType>, object> where = new Dictionary <KeyValuePair <string, SQLFilterType>, object>(); if (!string.IsNullOrWhiteSpace(Request["name"])) { where.Add(new KeyValuePair <string, RoadFlow.Data.Model.SQLFilterType>("Name", RoadFlow.Data.Model.SQLFilterType.CHARINDEX), Request["name"]); viewModel.ParaName = Request["name"]; } #endregion DataTable dt = BuildingsDataBLL.GetCurrentUsersOrganizeList(pageIndex.Value, pageSize, where, out pager); viewModel.List = dt; viewModel.Pager = pager; DictionaryBLL dictionaryBLL = new DictionaryBLL(); viewModel.HouseName = dictionaryBLL.GetListByCode("LPMC"); viewModel.HouseName.PrimaryKey = new DataColumn[] { viewModel.HouseName.Columns["ID"] }; WorkFlowBLL workFlowBLL = new WorkFlowBLL(); viewModel.EditFlowID = workFlowBLL.GetByName("楼栋更新").ID; viewModel.ToStreetID = GetToStreetID(houses); return(viewModel); }
private BuildingBindHouseIDViewModel BindHouseIDInit(Guid buildingID) { BuildingBindHouseIDViewModel viewModel = new BuildingBindHouseIDViewModel(); var building = BLL.Get(buildingID); viewModel.Building = building; viewModel.Dictionary = DictionaryBLL.GetListByCode("LPMC").ToList <RoadFlow.Data.Model.DictionaryModel>(); return(viewModel); }
private BuildingEditViewModel EditInit(Guid id) { BuildingEditViewModel viewModel = new BuildingEditViewModel(); viewModel.EditModel = BuildingsAndBuildingMonthInfoBLL.Get(id); viewModel.JSJDList = new SelectList(DictionaryBLL.GetListByCode("JSJD").ToList <RoadFlow.Data.Model.DictionaryModel>(), "ID", "Title", viewModel.EditModel.JSJD); viewModel.LYCQQKList = new SelectList(DictionaryBLL.GetListByCode("LYCQQK").ToList <RoadFlow.Data.Model.DictionaryModel>(), "ID", "Title", viewModel.EditModel.LYCQQK); viewModel.LYJBList = new SelectList(DictionaryBLL.GetListByCode("LYJB").ToList <RoadFlow.Data.Model.DictionaryModel>(), "ID", "Title", viewModel.EditModel.LYJB); viewModel.LYLXList = new SelectList(DictionaryBLL.GetListByCode("LYLX").ToList <RoadFlow.Data.Model.DictionaryModel>(), "ID", "Title", viewModel.EditModel.LYLX); viewModel.SSJDList = new SelectList(DictionaryBLL.GetListByCode("SSJD").ToList <RoadFlow.Data.Model.DictionaryModel>(), "ID", "Title", viewModel.EditModel.SSJD); viewModel.TCZSList = new SelectList(DictionaryBLL.GetListByCode("TCZS").ToList <RoadFlow.Data.Model.DictionaryModel>(), "ID", "Title", viewModel.EditModel.TCZS); viewModel.ZYKTList = new SelectList(DictionaryBLL.GetListByCode("ZYKT").ToList <RoadFlow.Data.Model.DictionaryModel>(), "ID", "Title", viewModel.EditModel.ZYKT); viewModel.SY_ZJList = new SelectList(DictionaryBLL.GetListByCode("SY_ZJ").ToList <RoadFlow.Data.Model.DictionaryModel>(), "ID", "Title", viewModel.EditModel.SY_ZJ); viewModel.SW_ZJList = new SelectList(DictionaryBLL.GetListByCode("SW_ZJ").ToList <RoadFlow.Data.Model.DictionaryModel>(), "ID", "Title", viewModel.EditModel.SW_ZJ); viewModel.IsImportantList = new SelectList(DictionaryBLL.GetListByCode("IsImportant").ToList <RoadFlow.Data.Model.DictionaryModel>(), "ID", "Title", viewModel.EditModel.IsImportant); return(viewModel); }
private SubmitIndexViewModel IndexInit() { SubmitIndexViewModel viewModel = new SubmitIndexViewModel(); //获取当前用户所属组织有的楼盘权限 DataTable dt = ElementOrganizeBLL.GetCurrentBuildingModify(); viewModel.List = dt; DictionaryBLL dictionaryBLL = new DictionaryBLL(); viewModel.HouseName = dictionaryBLL.GetListByCode("LPMC"); viewModel.HouseName.PrimaryKey = new DataColumn[] { viewModel.HouseName.Columns["ID"] }; WorkFlowBLL workFlowBLL = new WorkFlowBLL(); viewModel.CreateFlowID = workFlowBLL.GetByName("楼栋报送").ID; viewModel.ToStreetID = GetToStreetID(dt); return(viewModel); }
/// <summary> /// 楼栋列表视图初始化(商务局,街道办,报送单位) /// </summary> /// <returns></returns> private BuildingIndexViewModel BuildingInit(int type) { BuildingIndexViewModel viewModel = new BuildingIndexViewModel(); string pager = string.Empty; Dictionary <KeyValuePair <string, RoadFlow.Data.Model.SQLFilterType>, object> where = IndexGetMoreWhere();//更多条件 #region 固定where if (!string.IsNullOrWhiteSpace(Request["Name"])) { viewModel.Name = Request["Name"]; where.Add(new KeyValuePair <string, RoadFlow.Data.Model.SQLFilterType>("Name", RoadFlow.Data.Model.SQLFilterType.CHARINDEX), viewModel.Name); } if (!string.IsNullOrWhiteSpace(Request["SSJD"])) { viewModel.SSJD = Request["SSJD"]; where.Add(new KeyValuePair <string, RoadFlow.Data.Model.SQLFilterType>("SSJD", RoadFlow.Data.Model.SQLFilterType.EQUAL), viewModel.SSJD); } #endregion if (type == 0) {//商务局 viewModel.List = BuildingsAndBuildingMonthInfoBLL.GetPagerData(out pager, PageSize, RoadFlow.Utility.Tools.GetPageNumber(), where); } else if (type == 1) { //街道办 var ssjd = new RoadFlow.Platform.DictionaryBLL().GetCurrentSSJD(); viewModel.SSJD = ssjd == null ? "" : ssjd.Value.ToString(); if (string.IsNullOrWhiteSpace(Request["SSJD"])) { where.Add(new KeyValuePair <string, RoadFlow.Data.Model.SQLFilterType>("SSJD", RoadFlow.Data.Model.SQLFilterType.EQUAL), viewModel.SSJD); } viewModel.List = BuildingsAndBuildingMonthInfoBLL.GetPagerData(out pager, PageSize, RoadFlow.Utility.Tools.GetPageNumber(), where); } else { //报送单位 viewModel.List = BuildingsAndBuildingMonthInfoBLL.GetCurrentUsersOrganizeList(out pager, PageSize, RoadFlow.Utility.Tools.GetPageNumber(), where); } viewModel.Pager = pager; viewModel.Display = GetColItemList();//读取显示字段配置信息 viewModel.Dictionarys = DictionaryBLL.GetListAll(); viewModel.SSJDList = new SelectList(DictionaryBLL.GetListByCode("SSJD").ToList <RoadFlow.Data.Model.DictionaryModel>(), "ID", "Title", viewModel.SSJD); return(viewModel); }