private ExternalInterfaceQueryCondition getCondition() { var condition = new ExternalInterfaceQueryCondition(); if (!string.IsNullOrWhiteSpace(this.txtAccount.Text)) { condition.UserNo = this.txtAccount.Text.Trim(); } if (!string.IsNullOrWhiteSpace(this.txtAbbreviateName.Text)) { condition.AbbreviateName = this.txtAbbreviateName.Text.Trim(); } if (!string.IsNullOrWhiteSpace(this.txtOpenTimeStart.Text)) { condition.OpenTimeStart = DateTime.Parse(this.txtOpenTimeStart.Text); } if (!string.IsNullOrWhiteSpace(this.txtOpenTimeEnd.Text)) { condition.OpenTimeEnd = DateTime.Parse(this.txtOpenTimeEnd.Text).AddDays(1).AddMilliseconds(-3); } if (!string.IsNullOrWhiteSpace(this.ddlStatus.SelectedValue)) { if (this.ddlStatus.SelectedValue == "1") { condition.IsOpenExternalInterface = true; } else { condition.IsOpenExternalInterface = false; } } return(condition); }
/// <summary> /// 查询接口列表 /// </summary> /// <param name="condition">查询条件</param> /// <param name="pagination">分页信息</param> /// <returns></returns> public static IEnumerable <ExternalInterfaceInfo> Query(ExternalInterfaceQueryCondition condition, Pagination pagination) { var repository = Factory.CreateExternalInterfaceRepository(); return(repository.Query(condition, pagination)); }