public ActionResult AddressManager(int?companySysNo) { int no = companySysNo.GetValueOrDefault(); if (!companySysNo.HasValue) { if (CurrUser.CompanySysNo > 0) { no = CurrUser.CompanySysNo; } } AddressManagerModel model = new AddressManagerModel { CompanySysNo = no }; var company = CompanyService.LoadCompany(no); if (company != null) { model.AreaSysNo = company.AreaSysNo; model.Address = company.Address; } else { model.HasError = true; model.ErrorMessage = "客户信息不存在可能已经被删除,请刷新页面重试。"; } QF_SystemUser filter = new QF_SystemUser() { PageSize = 10000, PageIndex = 0, MasterSysNo = no, CommonStatus = CommonStatus.Actived }; AddressFilter addFilter = new AddressFilter { PageSize = 5, AddressGrade = AddressGrade.Building, CompanySysNo = no }; QueryResult <Address> addResult = AddressService.QueryAddressList(addFilter); if (addResult != null && addResult.data != null) { var root = addResult.data.Find(a => a.ParentSysNo.GetValueOrDefault() == 0); if (root != null) { model.AreaSysNo = root.AreaSysNo; model.Address = root.PathName; } } var result = user_service.QuerySystemUserList(filter); model.ManagerList = result.data; return(View(model)); }
public ActionResult Query() { string json = Request["data"]; if (string.IsNullOrWhiteSpace(json)) { throw new BusinessException("传入数据不能为空"); } QF_SystemUser qf = JsonConvert.DeserializeObject <QF_SystemUser>(json); qf.ApplicationID = ConstValue.ApplicationID; var result = user_service.QuerySystemUserList(qf); return(AjaxJsonTableData(result)); }