public DTO.PSOrgQuery OrgQuery(DTO.PQOrgQuery request) { DTO.PSOrgQuery response = new DTO.PSOrgQuery(); try { DAL.cUserDAL dal = new DAL.cUserDAL(con); dal.OrgQueryBuild(request); response.data = dal.Query <Data.DTO.LOrg>(); int num = dal.Count(); response.Page = request.Page; response.MaxNum = num; response.count = num; response.MaxPage = MathExpansion.CaculatPage(num, request.PageRow); response.ErrorMessage = rm.GetString(response.ErrorCode); response.code = response.ErrorCode == "A_0" ? "0" : response.ErrorCode; response.msg = response.ErrorMessage; } catch (Exception ex) { LogHelper.Error("cUserBLL.QueryUser出错!", ex); throw; } return(response); }
public void OrgQueryBuild(DTO.PQOrgQuery request) { this.AppendInit(); this.AppendFieldRownum("o.OrgID desc"); this.AppendFieldStr("o.[OrgID]"); this.AppendFieldStr("o.[OrgName]"); this.AppendFieldStr("o.[RealPath]"); this.AppendFieldStr("o.[FullPath]"); this.AppendFieldStr("o.[UpdateTime]"); this.AppendFieldStr("o.[CreateTime]"); this.AppendFieldStr("o.[Description]"); this.AppendFieldStr("o.[ParentID]"); this.AppendFromStr("from tbOrg o"); this.AppendFromStr("where 1=1"); this.AppendComplete(request.Page, request.PageRow); }