public PagingEntity<FullLogonHistory> QueryPaging(FullLogonHistoryQueryForm form) { PagingEntity<FullLogonHistory> result = new PagingEntity<FullLogonHistory>(); result.Record = bll.Query(form); result.RecordCount = bll.QueryCount(form); return result; }
public PagingEntity<Customer> QueryAllPaging() { CustomerQueryForm form = new CustomerQueryForm { Enabled = 1, IsDeleted = 0 }; PagingEntity<Customer> result = new PagingEntity<Customer>(); result.Record = bll.Query(form); result.RecordCount = bll.QueryCount(form); return result; }
public PagingEntity<FullUser> QueryPaging(FullUserQueryForm form) { form.IsDeleted = 0; PagingEntity<FullUser> result = new PagingEntity<FullUser>(); result.Record = bll.Query(form); result.RecordCount = bll.QueryCount(form); return result; }
public PagingEntity<FullHouse> QueryPaging(QueryHouseServiceForm form) { form.IsDeleted = 0; form.Enabled = 1; form.IsOurs = 1; PagingEntity<FullHouse> result = new PagingEntity<FullHouse>(); result.Record = bll.Query(form); result.RecordCount = bll.QueryCount(form); return result; }
public PagingEntity<Customer> Query(CustomerQueryForm form) { List<string> useridList = Common.GetDataAuthorityUserIDList(); form.Creators = useridList; var list = bll.Query(form); PagingEntity<Customer> paggingList = new PagingEntity<Customer>(); paggingList.Record = list; paggingList.PageCount = form.PageCount; paggingList.RecordCount = form.RecordCount; return paggingList; }
/// <summary> /// 查询 /// </summary> /// <param name="QuickConditions"></param> /// <param name="pageindex"></param> /// <param name="pagesize"></param> /// <returns></returns> public PagingEntity GetDataSource(Hashtable query, int pageindex, int pagesize) { string where = ""; PagingEntity pe = db.Find(@"select uFunction_ID _ukid, iFunction_Number, cFunction_Name, cFunction_ByName, dFunction_CreateTime from [dbo].[T_Function] where 1=1 " + where + " order by iFunction_Number ", pageindex, pagesize); return(new ToJson().GetPagingEntity(pe, new List <BaseEntity>() { new T_Function() })); }
public PagingEntity <FullUser> QueryUser(FullUserQueryForm form) { var list = bll.Query(form); PagingEntity <FullUser> users = new PagingEntity <FullUser> { Record = list, PageCount = form.PageCount, RecordCount = form.RecordCount, }; return(users); }
/// <summary> /// 通过分页存储过程获取实体集 /// </summary> /// <param name="page"></param> /// <returns></returns> public static List <T> GetEntityListByPagination(PagingEntity page) { DataSet ds = GetDataSetByPagination(page); if (ds.Tables.Count > 1 && ds.Tables[1].Rows.Count > 0) { int iDataCount = 0; int.TryParse(ds.Tables[1].Rows[0][0] + "", out iDataCount); page.DataCount = iDataCount; } return(DataSetToEntityList(ds)); }
public PagingEntity <Customer> Query(CustomerQueryForm form) { List <string> useridList = Common.GetDataAuthorityUserIDList(); form.Creators = useridList; var list = bll.Query(form); PagingEntity <Customer> paggingList = new PagingEntity <Customer>(); paggingList.Record = list; paggingList.PageCount = form.PageCount; paggingList.RecordCount = form.RecordCount; return(paggingList); }
public static DataSet GetDataSetByPagination <T>(this T t, PagingEntity page, ref string HtmlPage) where T : class { DataSet ds = EntityOperate <T> .GetDataSetByPagination(page); if (ds.Tables.Count > 1 && ds.Tables[1].Rows.Count > 0) { int iDataCount = 0; int.TryParse(ds.Tables[1].Rows[0][0] + "", out iDataCount); page.DataCount = iDataCount; HtmlPage = page.CreateHtmlPage(""); } return(ds); }
public PagingEntity<Asset> Query(AssetQueryForm form) { List<string> useridList = Common.GetDataAuthorityUserIDList(); form.Creators = useridList; var list = bll.Query(form); PagingEntity<Asset> assets = new PagingEntity<Asset> { Record = list, PageCount = form.PageCount, RecordCount = form.RecordCount, }; return assets; }
public PagingEntity PagingList(string SQL, int PageIndex, int PageSize) { var pe = new PagingEntity(); int PageCount = 0, Counts = 0; var dt = new DataTable(); dt = SqlHelper.SysPageList(SQL, PageIndex, PageSize, out PageCount, out Counts); pe.dt = dt; pe.Counts = Counts; pe.PageCount = PageCount; pe.List = ConvertDataTableToList <Dictionary <string, object> >(dt); return(pe); }
public virtual ActionResult ExportExcel(FormCollection fc, int page = 1, int rows = 100000) { foreach (var item in Request.QueryString.Keys) { if (!fc.AllKeys.Contains(item.ToString())) { fc.Add(item.ToString(), Tools.getString(Request.QueryString[item.ToString()])); } } PagingEntity pe = GetPagingEntity(fc, page, rows); return(File(DBToExcel(pe), Tools.GetFileContentType[".xls"], Guid.NewGuid().ToString() + ".xls")); }
public HttpResponseMessage Search(string searchText, int pageIndex, int pageSize) { Expression <Func <bec_AssInformation, bool> > queryexpress = CreateLinkQuery(searchText); Expression <Func <bec_AssInformation, int> > orderexpress = p => p.Id; int total = 0; return(ExceptionHelp.Execute <PagingEntity <bec_AssInformation> >(() => { PagingEntity <bec_AssInformation> result = new PagingEntity <bec_AssInformation>(); result.items = dbBase.LoadPagerEntities(pageSize, pageIndex, out total, queryexpress, true, orderexpress); result.total = total; return result; }, Request)); }
public PagingEntity <InitApprovalResultForm> QueryMyApply(QueryMyApplyServiceForm form) { UserBLL userbll = new UserBLL(); string userid = userbll.GetCurrentUser().User.ID; form.UserID = userid; form.Creators = Common.GetDataAuthorityUserIDList(); PagingEntity <InitApprovalResultForm> result = new PagingEntity <InitApprovalResultForm>(); result.Record = bll.QueryMyApply(form); result.PageCount = form.PageCount; result.RecordCount = form.RecordCount; return(result); }
public HttpResponseMessage ListPage([FromBody] bec_AssInformation filter, int pageIndex, int pageSize) { Expression <Func <bec_AssInformation, bool> > queryexpress = CreateQueryFilter(filter); Expression <Func <bec_AssInformation, int> > orderexpress = p => p.Id; int total = 0; return(ExceptionHelp.Execute <PagingEntity <bec_AssInformation> >(() => { PagingEntity <bec_AssInformation> result = new PagingEntity <bec_AssInformation>(); result.items = dbBase.LoadPagerEntities(pageSize, pageIndex, out total, queryexpress, true, orderexpress); result.total = total; return result; }, Request)); }
public PagingEntity <Asset> Query(AssetQueryForm form) { List <string> useridList = Common.GetDataAuthorityUserIDList(); form.Creators = useridList; var list = bll.Query(form); PagingEntity <Asset> assets = new PagingEntity <Asset> { Record = list, PageCount = form.PageCount, RecordCount = form.RecordCount, }; return(assets); }
public virtual ActionResult GetDataSource(FormCollection fc, int page = 1, int rows = 20) { var hs = Tools.GetUrlQueryString(Request.UrlReferrer.Query); foreach (var item in hs.Keys) { if (!fc.AllKeys.Contains(item.ToString())) { fc.Add(item.ToString(), Tools.getString(hs[item.ToString()])); } } PagingEntity pe = GetPagingEntity(fc, page, rows); return(Json(new { status = 1, columnModel = pe.ColModel, rows = pe.List, page = page, records = pe.Counts, total = pe.PageCount }, JsonRequestBehavior.DenyGet)); }
private void button16_Click(object sender, EventArgs e) { Workflow workflow = new Workflow(); RoleBLL rolebll = new RoleBLL(); CustomerBLL customerbll = new CustomerBLL(); List <string> ids = rolebll.GetUserSubUserIDs("13"); CustomerQueryForm form = new CustomerQueryForm(); form.Creators = ids; var list = customerbll.Query(form); PagingEntity <Customer> paggingList = new PagingEntity <Customer>(); paggingList.Record = list; paggingList.PageCount = form.PageCount; paggingList.RecordCount = form.RecordCount; }
/// <summary> /// 通过分页存储过程获取数据 /// </summary> /// <param name="page"></param> /// <returns></returns> public static DataSet GetDataSetByPagination(PagingEntity page) { DbParameter[] parameters = new DbParameter[8]; parameters[0] = dataProvider.CreateParameter("@Tables", typeof(T).Name, DbType.String, 1000); parameters[0] = dataProvider.CreateParameter("@PK", page.PrimaryKey, DbType.String, 100); parameters[0] = dataProvider.CreateParameter("@Sort", page.Sort, DbType.String, 200); parameters[0] = dataProvider.CreateParameter("@PageNumber", page.CurPage, DbType.Int16); parameters[0] = dataProvider.CreateParameter("@PageSize", page.PageSize, DbType.Int16); parameters[0] = dataProvider.CreateParameter("@Fields", page.Fields, DbType.String, 1000); parameters[0] = dataProvider.CreateParameter("@Filter", page.QueryString, DbType.String, 1000); parameters[0] = dataProvider.CreateParameter("@Group", DBNull.Value, DbType.String, 1000); DataSet ds = new DataSet();//dataProvider.GetDataSetByProcedure("Page2005", parameters); return(ds); }
public virtual byte[] DBToExcel(PagingEntity pe) { DataTable dt = pe.Table; var list = pe.ColModel; HSSFWorkbook workbook = new HSSFWorkbook(); ISheet sheet = workbook.CreateSheet(); //填充表头 IRow dataRow = sheet.CreateRow(0); foreach (DataColumn column in dt.Columns) { if (column.ColumnName.Equals("_ukid")) { continue; } foreach (var item in list) { if (column.ColumnName.Equals(item["field"].ToStr())) { dataRow.CreateCell(column.Ordinal).SetCellValue(item["title"].ToStr()); } } } //填充内容 for (int i = 0; i < dt.Rows.Count; i++) { dataRow = sheet.CreateRow(i + 1); for (int j = 0; j < dt.Columns.Count; j++) { if (dt.Columns[j].ColumnName.Equals("_ukid")) { continue; } dataRow.CreateCell(j).SetCellValue(dt.Rows[i][j].ToString()); } } //保存 using (MemoryStream ms = new MemoryStream()) { workbook.Write(ms); return(ms.ToArray()); } }
public PagingEntity <FullTask> QueryMyProcessingWithPaging(QueryMyProcessingServiceForm form) { UserBLL userbll = new UserBLL(); TaskBLL taskbll = new TaskBLL(); PagingEntity <FullTask> result = new PagingEntity <FullTask> { PageCount = form.PageCount, RecordCount = form.RecordCount, }; var user = userbll.GetCurrentUser(); var record = taskbll.Query(new QueryMyTaskServiceForm { UserID = user.User.ID, Status = (int)TaskProcessStatus.Started }); result.Record = record; return(result); }
/// <summary> /// 查询 /// </summary> /// <param name="QuickConditions"></param> /// <param name="pageindex"></param> /// <param name="pagesize"></param> /// <returns></returns> public PagingEntity GetDataSource(Hashtable query, int pageindex, int pagesize) { string where = ""; where += string.IsNullOrEmpty(Tools.getString(query[Tools.getAttrName(() => tusers.cUsers_Name)])) ? "" : " and " + Tools.getAttrName(() => tusers.cUsers_Name) + " like '%" + Tools.getString(query[Tools.getAttrName(() => tusers.cUsers_Name)]) + "%' "; where += string.IsNullOrEmpty(Tools.getString(query[Tools.getAttrName(() => tusers.cUsers_LoginName)])) ? "" : " and " + Tools.getAttrName(() => tusers.cUsers_LoginName) + " like '%" + Tools.getString(query[Tools.getAttrName(() => tusers.cUsers_LoginName)]) + "%' "; PagingEntity pe = db.Find(@"select cUsers_Name, cUsers_LoginName,cRoles_Name ,dUsers_CreateTime,uUsers_ID _ukid from T_Users a left join dbo.T_UsersRoles b on a.uUsers_ID=b.uUsersRoles_UsersID left join dbo.T_Roles c on b.uUsersRoles_RoleID=c.uRoles_ID where 1=1 " + where + " ", pageindex, pagesize); return(new ToJson().GetPagingEntity(pe, new List <BaseEntity>() { new T_Users(), new T_Roles() })); }
/// <summary> /// 生产表头 Json 对象 /// </summary> /// <param name="_PagingEntity"></param> /// <param name="ArryEntity"></param> private void SetHeaderJson(PagingEntity _PagingEntity, params BaseClass[] ArryEntity) { var dic = new Dictionary <string, object>(); var list = new List <PropertyInfo>(); var colNames = new List <Dictionary <string, string> >(); ArryEntity.ToList().ForEach(item => { //将所有实体里面的属性放入list中 item.GetType().GetProperties().ToList().ForEach(p => { list.Add(p); }); }); foreach (DataColumn dc in _PagingEntity.Table.Columns) { dic = new Dictionary <string, object>(); var col = new Dictionary <string, string>(); var pro = list.Find(item => item.Name.Equals(dc.ColumnName)); dic["field"] = dc.ColumnName; dic["align"] = "left"; dic["sortable"] = true; if (pro == null) { dic["title"] = dc.ColumnName; dic["visible"] = !dc.ColumnName.Equals("_ukid"); col.Add(dc.ColumnName, dc.ColumnName); } else { //获取有特性标记的属性【获取字段别名(中文名称)】 var FiledConfig = pro.GetCustomAttribute(typeof(FieldAttribute)) as FieldAttribute; if (FiledConfig != null) { dic["title"] = (FiledConfig.Alias == "" ? dc.ColumnName : FiledConfig.Alias); dic["visible"] = true; col.Add(dc.ColumnName, dic["title"].ToStr()); } } _PagingEntity.ColNames.Add(col); _PagingEntity.ColModel.Add(dic); } }
public UserInitResultForm Init(FullUserQueryForm form) { var list = bll.Query(form); PagingEntity <FullUser> users = new PagingEntity <FullUser> { Record = list, PageCount = form.PageCount, RecordCount = form.RecordCount, }; RoleBLL rolebll = new RoleBLL(); var role = rolebll.Query(new RoleQueryForm { }); UserInitResultForm resultform = new UserInitResultForm { User = users, Role = role, }; return(resultform); }
/// <summary> /// 设置前台页面表头 /// </summary> /// <param name="pe">Find查询完成后的PagingEntity对象</param> /// <param name="ArryEntity">查询涉及的表</param> /// <param name="isExecute">是否执行</param> public PagingEntity GetPagingEntity(PagingEntity pe, List <BaseModel> ArryEntity, bool isExecute = true) { if (isExecute) { var list = new List <PropertyInfo>(); ArryEntity.ForEach(item => { //将所有实体里面的属性放入list中 item.EH.GetAllPropertyInfo(item).ForEach(p => { list.Add(p); }); }); foreach (DataColumn dc in pe.dt.Columns) { mjgcm = new M_JqGridColModel(); var pro = list.Find(item => item.Name.Equals(dc.ColumnName)); if (pro == null) { mjgcm.label = dc.ColumnName; mjgcm.name = dc.ColumnName; mjgcm.hidden = dc.ColumnName.Equals("_ukid") ? true : false; mjgcm.align = "left"; } else { //获取有特性标记的属性【获取字段别名(中文名称)】 var FiledConfig = pro.GetCustomAttribute(typeof(FiledAttribute)) as FiledAttribute; mjgcm = new M_JqGridColModel(); mjgcm.label = (FiledConfig.DisplayName == "" ? dc.ColumnName : FiledConfig.DisplayName); mjgcm.name = dc.ColumnName; mjgcm.hidden = !FiledConfig.IsShowColumn; mjgcm.align = "left"; } pe.JqGridColModel.Add(mjgcm); } } return(pe); }
public PagingEntity <InitApprovalResultForm> Query(QueryProjectServiceForm form) { var list = bll.QueryProjectByRelationship(form); if (list.Count == 0) { return(new PagingEntity <InitApprovalResultForm> { }); } var projectids = (from p in list select p.ID).Distinct().ToList(); UserBLL userbll = new UserBLL(); string userid = userbll.GetCurrentUser().User.ID; var record = bll.Query(projectids, null, userid); PagingEntity <InitApprovalResultForm> result = new PagingEntity <InitApprovalResultForm> { Record = record, PageCount = form.PageCount, RecordCount = form.RecordCount, }; return(result); }
/// <summary> /// 设置前台页面表头 /// </summary> /// <param name="pe">Find查询完成后的PagingEntity对象</param> /// <param name="ArryEntity">查询涉及的表</param> /// <param name="isExecute">是否执行</param> public PagingEntity GetPagingEntity(PagingEntity pe, List <BaseEntity> ArryEntity, bool isExecute = true) { if (isExecute) { var list = new List <PropertyInfo>(); ArryEntity.ForEach(item => { //将所有实体里面的属性放入list中 item.EH.GetAllPropertyInfo(item).ForEach(p => { list.Add(p); }); }); foreach (DataColumn dc in pe.dt.Columns) { mjgcm = new BootStrapTableColModel(); var pro = list.Find(item => item.Name.Equals(dc.ColumnName)); if (pro == null) { mjgcm.title = dc.ColumnName; mjgcm.field = dc.ColumnName; mjgcm.visible = dc.ColumnName.Equals("_ukid") ? false : true; mjgcm.align = "left"; } else { //获取有特性标记的属性【获取字段别名(中文名称)】 var FiledConfig = pro.GetCustomAttribute(typeof(ObjectRemarks.FieldAttribute)) as ObjectRemarks.FieldAttribute; mjgcm = new BootStrapTableColModel(); mjgcm.title = (FiledConfig.Alias == "" ? dc.ColumnName : FiledConfig.Alias); mjgcm.field = dc.ColumnName; mjgcm.visible = true; mjgcm.align = "left"; } pe.ColModel.Add(mjgcm); } } return(pe); }
/// <summary> /// 分页查询 通过 存储过程 PROC_SPLITPAGE /// </summary> /// <param name="SqlStr"></param> /// <param name="Page"></param> /// <param name="Rows"></param> /// <param name="Param"></param> /// <param name="ArryEntity"></param> /// <returns></returns> private PagingEntity GetPagingEntity(string SqlStr, int Page, int Rows, DbParameter[] Param, params BaseClass[] ArryEntity) { var _PagingEntity = new PagingEntity(); //解析参数 foreach (var item in Param) { SqlStr = SqlStr.Replace("@" + item.ParameterName, item.Value == null ? null : "'" + item.Value + "' "); } var _DynamicParameters = new DynamicParameters(); _DynamicParameters.Add("@SQL", SqlStr, DbType.String, ParameterDirection.Input); _DynamicParameters.Add("@PAGE", Page, DbType.Int32, ParameterDirection.Input); _DynamicParameters.Add("@PAGESIZE", Rows, DbType.Int32, ParameterDirection.Input); _DynamicParameters.Add("@PAGECOUNT", 0, DbType.Int32, ParameterDirection.Output); _DynamicParameters.Add("@RECORDCOUNT", 0, DbType.Int32, ParameterDirection.Output); var _IDataReader = db.ExecuteReader("PROC_SPLITPAGE", _DynamicParameters, null, 30, CommandType.StoredProcedure); //将 IDataReader 对象转换为 DataSet DataSet _DataSet = new AdoExtend.WYDataSet(); _DataSet.Load(_IDataReader, LoadOption.OverwriteChanges, null, new DataTable[] { }); if (_DataSet.Tables.Count == 2) { var _Table = _DataSet.Tables[1]; var _Total = _DynamicParameters.Get <int>("@RECORDCOUNT"); _PagingEntity.Table = _Table; _PagingEntity.Counts = _Total; _PagingEntity.PageCount = (_Total / Rows); _PagingEntity.List = _Table.ToList(); this.SetHeaderJson(_PagingEntity, ArryEntity); } return(_PagingEntity); }
public PagingEntity<FollowupModel> QueryFullFollowup(FullFollowupQueryForm form) { HouseBLL housebll = new HouseBLL(); BuildingBLL buildingbll = new BuildingBLL(); UserBLL userbll = new UserBLL(); CustomerBLL customerbll = new CustomerBLL(); House_CustomerBLL hcbll = new House_CustomerBLL(); PagingEntity<FollowupModel> result = new PagingEntity<FollowupModel>(); result.Record = new List<FollowupModel>(); var list = bll.QueryFullFollowup(form); var houseids = (from f in list select f.HouseID).Distinct().ToList(); var houses = housebll.Query(new HouseQueryForm { IDs = houseids }); var buildingids = (from h in houses select h.BuildingID).Distinct().ToList(); var ownerids = (from h in houses where !string.IsNullOrEmpty(h.OwnerID) select h.OwnerID).Distinct().ToList(); var userids = (from f in list select f.Creator).Distinct().ToList(); var buildings = buildingbll.Query(new BuildingQueryForm { IDs = buildingids }); var hcs = hcbll.Query(new House_CustomerQueryForm { HouseOrRoomIDs = houseids }); var customerids = (from hc in hcs select hc.CustomerID).Distinct().ToList(); var customers = customerbll.Query(new CustomerQueryForm { IDs = customerids }); var users = userbll.SimpleQuery(new FullUserQueryForm { IDs = userids }); list.ForEach(t => { FollowupModel followup = new FollowupModel { House = houses.Find(p => p.ID.Equals(t.HouseID)), Followup = t, User = users.Find(p=>p.ID.Equals(t.Creator)), }; followup.Building = buildings.Find(p => p.ID.Equals(followup.House?.BuildingID)); followup.Owner = (from hc in hcs join c in customers on hc.CustomerID equals c.ID where hc.HouseOrRoomID.Equals(followup.House?.ID) && c.Type == (int)CustomerType.业主 select c).FirstOrDefault(); result.Record.Add(followup); }); result.RecordCount = bll.QueryFullFollowupCount(form); return result; }
public PagingEntity PagingList(string SQL, int PageIndex, int PageSize) { var pe = new PagingEntity(); int PageCount = 0, Counts = 0; var dt = new DataTable(); switch (_DBType) { case DBType.MySql: dt = MySqlHelper.PagingList(_ConnectionString, SQL, PageIndex, PageSize, out PageCount, out Counts); break; case DBType.SqlServer: default: dt = SqlHelper.SysPageList(SQL, PageIndex, PageSize, out PageCount, out Counts); break; } pe.dt = dt; pe.Counts = Counts; pe.PageCount = PageCount; pe.List = Tool.ConvertDataTableToList <Dictionary <string, object> >(dt); return(pe); }
/// <summary> /// 分页查询 /// </summary> /// <param name="Iquery"></param> /// <param name="Page"></param> /// <param name="Rows"></param> /// <param name="ArryEntity"></param> /// <returns></returns> public PagingEntity GetPagingEntity(IQuery Iquery, int Page, int Rows, params BaseClass[] ArryEntity) { var _Count = Iquery.Count(); var _TakePage = Iquery.TakePage(Page, Rows); var _PagingEntity = new PagingEntity(); var _Table = _TakePage.ToTable(); if (_Table.Columns.Contains("ROWID")) { _Table.Columns.RemoveAt(0); } _PagingEntity.Table = _Table; _PagingEntity.Counts = _Count; _PagingEntity.PageCount = (_Count / Rows); _PagingEntity.List = _Table.ToList(); this.SetHeaderJson(_PagingEntity, ArryEntity); return(_PagingEntity); }
private void button16_Click(object sender, EventArgs e) { Workflow workflow = new Workflow(); RoleBLL rolebll = new RoleBLL(); CustomerBLL customerbll = new CustomerBLL(); List<string> ids = rolebll.GetUserSubUserIDs("13"); CustomerQueryForm form = new CustomerQueryForm(); form.Creators = ids; var list = customerbll.Query(form); PagingEntity<Customer> paggingList = new PagingEntity<Customer>(); paggingList.Record = list; paggingList.PageCount = form.PageCount; paggingList.RecordCount = form.RecordCount; }
public PagingEntity<InitApprovalResultForm> Query(QueryProjectServiceForm form) { var list = bll.QueryProjectByRelationship(form); if (list.Count == 0) { return new PagingEntity<InitApprovalResultForm> { }; } var projectids = (from p in list select p.ID).Distinct().ToList(); UserBLL userbll = new UserBLL(); string userid = userbll.GetCurrentUser().User.ID; var record = bll.Query(projectids, null, userid); PagingEntity<InitApprovalResultForm> result = new PagingEntity<InitApprovalResultForm> { Record = record, PageCount = form.PageCount, RecordCount = form.RecordCount, }; return result; }
public PagingEntity<InitApprovalResultForm> QueryMyApply(QueryMyApplyServiceForm form) { UserBLL userbll = new UserBLL(); string userid = userbll.GetCurrentUser().User.ID; form.UserID = userid; form.Creators = Common.GetDataAuthorityUserIDList(); PagingEntity<InitApprovalResultForm> result = new PagingEntity<InitApprovalResultForm>(); result.Record = bll.QueryMyApply(form); result.PageCount = form.PageCount; result.RecordCount = form.RecordCount; return result; }
public PagingEntity<Customer> QueryRenterPaging(CustomerQueryForm form) { if (form == null) form = new CustomerQueryForm(); form.Type = (int)CustomerType.租客; form.IsDeleted = 0; List<string> userids = Common.GetDataAuthorityUserIDList(); form.Creators = userids; PagingEntity<Customer> result = new PagingEntity<Customer>(); result.Record = bll.Query(form); result.RecordCount = bll.QueryCount(form); return result; }
public PagingEntity<Customer> QueryOurHouseOwnerPaging(FullCustomerQueryForm form) { PagingEntity<Customer> result = new PagingEntity<Customer>(); if (form == null) form = new FullCustomerQueryForm(); form.Type = (int)CustomerType.业主; form.IsDeleted = 0; form.IsOurs = 1; List<string> userids = Common.GetDataAuthorityUserIDList(); form.Creators = userids; result.Record = bll.QueryFullCustomer(form); result.RecordCount = bll.QueryFullCustomerCount(form); return result; }
public UserInitResultForm Init(FullUserQueryForm form) { var list = bll.Query(form); PagingEntity<FullUser> users = new PagingEntity<FullUser> { Record = list, PageCount = form.PageCount, RecordCount = form.RecordCount, }; RoleBLL rolebll = new RoleBLL(); var role = rolebll.Query(new RoleQueryForm { }); UserInitResultForm resultform = new UserInitResultForm { User = users, Role = role, }; return resultform; }
public PagingEntity<FullHouse> QueryHousePaging(QueryHouseServiceForm form) { form.IsDeleted = 0; PagingEntity<FullHouse> result = new PagingEntity<FullHouse>(); result.Record = housebll.QueryFullHouse(form); result.RecordCount = housebll.QueryFullHouseCount(form); return result; }
public PagingEntity<FullUser> QueryUser(FullUserQueryForm form) { var list = bll.Query(form); PagingEntity<FullUser> users = new PagingEntity<FullUser> { Record = list, PageCount = form.PageCount, RecordCount = form.RecordCount, }; return users; }