/// <summary> /// 查询供应商列表 /// </summary> /// <param name="request"></param> /// <param name="callback"></param> public void QuerySettle(SettleQueryFilter request, EventHandler <RestClientEventArgs <dynamic> > callback) { request.CompanyCode = CPApplication.Current.CompanyCode; string relativeUrl = "/POService/GatherSettlement/QuerySettleList"; restClient.QueryDynamicData(relativeUrl, request, callback); }
public ActionResult GetSettleData() { SettleQueryFilter filter = BuildQueryFilterEntity <SettleQueryFilter>(); filter.MerchantSysNo = UserAuthHelper.GetCurrentUser().SellerSysNo; var result = SettleService.SettleQuery(filter); return(AjaxGridJson(result)); }
public QueryResult QuerySettleList(SettleQueryFilter request) { int totalCount = 0; DataTable dt = ObjectFactory <IGatherSettleQueryDA> .Instance.QuerySettleList(request, out totalCount); dt = ObjectFactory <ConsignSettlementAppService> .Instance.GetSettleList(dt); QueryResult returnResult = new QueryResult() { Data = dt }; returnResult.TotalCount = totalCount; return(returnResult); }
public static int GetNotSettleedSysNo(int merchantsysno) { SettleQueryFilter filter = new SettleQueryFilter(); filter.MerchantSysNo = merchantsysno; filter.PageIndex = 0; filter.PageSize = 1; int count = 0; DataTable dt = SettleDA.SettleQuery(filter, out count); if (dt.Rows.Count > 0) { return((int)dt.Rows[0]["SysNo"]); } else { return(0); } }
public static QueryResult SettleQuery(SettleQueryFilter filter) { int count = 0; return(new QueryResult(SettleDA.SettleQuery(filter, out count), filter, count)); }
public static DataTable SettleQuery(SettleQueryFilter filter, out int dataCount) { CustomDataCommand command = DataCommandManager. CreateCustomDataCommandFromConfig("Invocie_SearchCommissionSettle"); using (DynamicQuerySqlBuilder builder = new DynamicQuerySqlBuilder( command.CommandText, command, filter, !string.IsNullOrWhiteSpace(filter.SortFields) ? filter.SortFields : "SysNo DESC")) { builder.ConditionConstructor.AddCondition(QueryConditionRelationType.AND, "SysNo", DbType.String, "@SysNo", QueryConditionOperatorType.LeftLike, filter.SysNo); builder.ConditionConstructor.AddCondition(QueryConditionRelationType.AND, "MerchantSysNo", DbType.String, "@MerchantSysNo", QueryConditionOperatorType.LeftLike, filter.MerchantSysNo); builder.ConditionConstructor.AddCondition(QueryConditionRelationType.AND, "Type", DbType.AnsiStringFixedLength, "@Type", QueryConditionOperatorType.Equal, filter.Type); builder.ConditionConstructor.AddCondition(QueryConditionRelationType.AND, "SettledDateTime", DbType.AnsiStringFixedLength, "@SettledBeginDateTime", QueryConditionOperatorType.MoreThanOrEqual, filter.SettledBeginDateTime); builder.ConditionConstructor.AddCondition(QueryConditionRelationType.AND, "SettledDateTime", DbType.AnsiStringFixedLength, "@SettledEndDateTime", QueryConditionOperatorType.LessThanOrEqual, filter.SettledEndDateTime); builder.ConditionConstructor.AddCondition(QueryConditionRelationType.AND, "IssuingDateTime", DbType.AnsiStringFixedLength, "@IssuingBeginDateTime", QueryConditionOperatorType.MoreThanOrEqual, filter.IssuingBeginDateTime); builder.ConditionConstructor.AddCondition(QueryConditionRelationType.AND, "IssuingDateTime", DbType.AnsiStringFixedLength, "@IssuingEndDateTime", QueryConditionOperatorType.LessThanOrEqual, filter.IssuingEndDateTime); command.CommandText = builder.BuildQuerySql(); string typeStr = string.Empty; if (filter.Type != null) { typeStr = string.Format("Where Type={0}", ((int)filter.Type.Value).ToString()); } command.CommandText = command.CommandText.Replace("#StrWhere2#", typeStr); var dt = command.ExecuteDataTable(); EnumColumnList enumColList = new EnumColumnList(); enumColList.Add("Status", typeof(SettleOrderStatus)); enumColList.Add("Type", typeof(SettleOrderType)); command.ConvertEnumColumn(dt, enumColList); dataCount = Convert.ToInt32(command.GetParameterValue("@TotalCount")); return(dt); } }