// Token: 0x06000275 RID: 629 RVA: 0x00013BD8 File Offset: 0x00011DD8 public List <QueryConditionEntity> getQueryConditionEntitys() { List <QueryConditionEntity> list = new List <QueryConditionEntity>(); QueryConditionEntity item = new QueryConditionEntity("用户姓名", "username", 3, false, null); list.Add(item); QueryConditionEntity item2 = new QueryConditionEntity("用户地址", "address", 3, false, null); list.Add(item2); QueryConditionEntity item3 = new QueryConditionEntity("联系方式", "phoneNum", 2, false, null); list.Add(item3); QueryConditionEntity item4 = new QueryConditionEntity("证件号码", "identityId", 2, false, null); list.Add(item4); QueryConditionEntity item5 = new QueryConditionEntity("设备号", "userId", 2, false, null); list.Add(item5); QueryConditionEntity item6 = new QueryConditionEntity("用户类型", "userTypeId", 2, true, this.userTypeDicts); list.Add(item6); QueryConditionEntity item7 = new QueryConditionEntity("价格类型", "userPriceConsistId", 2, true, this.unitPriceDicts); list.Add(item7); return(list); }
public List <QueryConditionEntity> getQueryConditionEntitys() { List <QueryConditionEntity> list = new List <QueryConditionEntity>(); QueryConditionEntity item = new QueryConditionEntity("用户姓名", "username", 3, false, null); list.Add(item); QueryConditionEntity item2 = new QueryConditionEntity("用户地址", "address", 3, false, null); list.Add(item2); QueryConditionEntity item3 = new QueryConditionEntity("联系方式", "phoneNum", 2, false, null); list.Add(item3); QueryConditionEntity item4 = new QueryConditionEntity("证件号码", "identityId", 2, false, null); list.Add(item4); QueryConditionEntity item5 = new QueryConditionEntity("设备号", "userId", 2, false, null); list.Add(item5); QueryConditionEntity item6 = new QueryConditionEntity("用户类型", "userTypeId", 2, true, userTypeDicts); list.Add(item6); QueryConditionEntity item7 = new QueryConditionEntity("价格类型", "userPriceConsistId", 2, true, unitPriceDicts); list.Add(item7); QueryConditionEntity item8 = new QueryConditionEntity("交易类型", "operateType", 2, true, new List <string>(WMConstant.UserCardOperateType), true); list.Add(item8); QueryConditionEntity item9 = new QueryConditionEntity("操作员编号", "operator", 2, false, null); list.Add(item9); return(list); }
// Token: 0x0600029C RID: 668 RVA: 0x000176A4 File Offset: 0x000158A4 private void queryItemCB_SelectedIndexChanged(object sender, EventArgs e) { ComboBox comboBox = (ComboBox)sender; int selectedIndex = comboBox.SelectedIndex; if (selectedIndex >= 0 && this.qces != null && this.qces.Count > selectedIndex) { QueryConditionEntity queryConditionEntity = this.qces[selectedIndex]; if (queryConditionEntity.OperatorsNum == 2) { SettingsUtils.setComboBoxData(this.op2CN, this.typeCB); } else { SettingsUtils.setComboBoxData(this.op3CN, this.typeCB); } if (queryConditionEntity.ShowInputAsCB) { this.valuesCB.Visible = true; this.valueTB.Visible = false; List <string> cbData = queryConditionEntity.CbData; if (cbData != null) { SettingsUtils.setComboBoxData(cbData, this.valuesCB); return; } } else { this.valuesCB.Visible = false; this.valueTB.Visible = true; } } }
/// <summary> /// 查询商品信息 /// </summary> /// <param name="query">查询条件</param> /// <returns></returns> public static List <ProductEntity> Query(QueryConditionEntity <QueryProduct> query) { CustomDataCommand command = DataCommandManager.CreateCustomDataCommandFromConfig("QueryProduct"); command.CommandText = ProductDASqlHelper.BuilderSql(command, query); List <ProductEntity> list = command.ExecuteEntityList <ProductEntity>(); return(list); }
private ActionResult Edit(int gsid, int pageIndex) { Session["UpdatedId_g"] = gsid; if (null != Session["HasQueried_g"]) { QueryConditionEntity qce = Session["QueryConditionEntity"] as QueryConditionEntity; GlobalSettingInfo info = new GlobalSettingInfo { QueryConditionEntity = new QueryConditionEntity { Name = qce.Name, Value = qce.Value } }; return(Query(info, pageIndex)); } return(RedirectToAction("Index", new { pageIndex = pageIndex })); }
public static Dictionary <int, List <ProductEntity> > QueryByStock(QueryConditionEntity <QueryProduct> query) { Dictionary <int, List <ProductEntity> > dic = new Dictionary <int, List <ProductEntity> >(); List <ProductEntity> list = Query(query); foreach (ProductEntity product in list) { int wareHourseNumber = product.WarehouseNumber; if (!dic.ContainsKey(wareHourseNumber)) { dic.Add(wareHourseNumber, new List <ProductEntity>()); } dic[wareHourseNumber].Add(product); } return(dic); }
private List <ProductEntity> GetProductEntityList() { QueryConditionEntity <QueryProduct> query = new QueryConditionEntity <QueryProduct>(); query.PagingInfo = new PagingInfoEntity { MaximumRows = int.MaxValue, //SortField = "its.StockSysNo", StartRowIndex = 0 }; query.Condition = GetQueryProduct(); List <ProductEntity> list = ProductQueryProvider.Query(query); return(Addapter.CalculateInventoryQty.FilterModifyInventerResult(list)); //return list; }
// Token: 0x0600025C RID: 604 RVA: 0x00011E48 File Offset: 0x00010048 public List <QueryConditionEntity> getQueryConditionEntitys() { List <QueryConditionEntity> list = new List <QueryConditionEntity>(); QueryConditionEntity item = new QueryConditionEntity("用户姓名", "username", 3, false, null); list.Add(item); QueryConditionEntity item2 = new QueryConditionEntity("用户地址", "address", 3, false, null); list.Add(item2); QueryConditionEntity item3 = new QueryConditionEntity("联系方式", "phoneNum", 2, false, null); list.Add(item3); QueryConditionEntity item4 = new QueryConditionEntity("证件号码", "identityId", 2, false, null); list.Add(item4); QueryConditionEntity item5 = new QueryConditionEntity("设备号", "userId", 2, false, null); list.Add(item5); return(list); }
internal static string BuilderSql(CustomDataCommand command, QueryConditionEntity <QueryProduct> query) { CommonConst commonConst = new CommonConst(); string sql = command.CommandText; bool hasWhere = false; using (DynamicQuerySqlBuilder builder = new DynamicQuerySqlBuilder( sql, command, query.PagingInfo, "its.StockSysNo")) { QueryProduct condition = query.Condition; if (!string.IsNullOrEmpty(condition.CompanyCode)) { builder.AddCondition(QueryConditionRelationType.AND, "ppm.CompanyCode", DbType.String, "@CompanyCode", QueryConditionOperatorType.Equal, condition.CompanyCode ); hasWhere = true; } if (!string.IsNullOrEmpty(condition.PartnerType)) { builder.AddCondition(QueryConditionRelationType.AND, "ppm.PartnerType", DbType.String, "@PartnerType", QueryConditionOperatorType.Equal, condition.PartnerType ); hasWhere = true; } if (condition.ProductID != null && condition.ProductID.Length > 0) { string productIds = Util.Contract("','", condition.ProductID); productIds = "'" + productIds + "'"; builder.AddCondition(QueryConditionRelationType.AND, "ppm.ProductID", DbType.String, "@ProductID", QueryConditionOperatorType.In, productIds ); hasWhere = true; } if (condition.ProductSysNo != null && condition.ProductSysNo.Length > 0) { string productSysNos = Util.Contract("','", condition.ProductSysNo); productSysNos = "'" + productSysNos + "'"; builder.AddCondition(QueryConditionRelationType.AND, "ppm.ProductSysNo", DbType.String, "@ProductSysNo", QueryConditionOperatorType.In, productSysNos ); hasWhere = true; } if (condition.SysProductID != null && condition.SysProductID.Length > 0) { string sysProductIds = Util.Contract("','", condition.SysProductID); sysProductIds = "'" + sysProductIds + "'"; builder.AddCondition(QueryConditionRelationType.AND, "ppm.SysProductID", DbType.String, "@SysProductID", QueryConditionOperatorType.In, sysProductIds ); hasWhere = true; } if (condition.WareHourseNumber != null && condition.WareHourseNumber.Length > 0) { string wareHourseNumbers = Util.Contract(",", condition.WareHourseNumber); builder.ConditionConstructor.AddSubQueryCondition(QueryConditionRelationType.AND, "its.StockSysNo", QueryConditionOperatorType.In, wareHourseNumbers ); hasWhere = true; } //状态筛选 builder.AddCondition(QueryConditionRelationType.AND, "ppm.Status", DbType.String, "@Status", QueryConditionOperatorType.Equal, 'A' ); hasWhere = true; sql = builder.BuildQuerySql(); //有库存变化的才进行数据捞取 string where = "(isnull(its.AvailableQty,0)+ isnull(its.ConsignQty,0)+isnull(its.VirtualQty,0)) <> isnull(ppsi.InventoryQty,0)"; sql = sql.Replace("@Where@", string.Format("{0}{1}", hasWhere ? " AND " : " ", where)); } return(sql); }
// Token: 0x0600029B RID: 667 RVA: 0x00017474 File Offset: 0x00015674 private string getSqlStr(int type) { int selectedIndex = this.queryItemCB.SelectedIndex; int selectedIndex2 = this.typeCB.SelectedIndex; if (selectedIndex >= 0 && selectedIndex2 >= 0 && this.qces != null && this.qces.Count > selectedIndex) { QueryConditionEntity queryConditionEntity = this.qces[selectedIndex]; string sqlKeys = queryConditionEntity.SqlKeys; bool showInputAsCB = queryConditionEntity.ShowInputAsCB; string text = this.valueTB.Text.Trim(); bool cbDataDirectValue = queryConditionEntity.CbDataDirectValue; if (showInputAsCB) { int selectedIndex3 = this.valuesCB.SelectedIndex; if (selectedIndex3 >= 0 && selectedIndex3 < queryConditionEntity.CbData.Count) { if (!cbDataDirectValue) { string input = queryConditionEntity.CbData[selectedIndex3]; Regex regex = new Regex("-"); string[] array = regex.Split(input); text = array[0]; } else { text = string.Concat(selectedIndex3); } } else { text = ""; } } if (selectedIndex2 == 2) { text = "%" + text + "%"; } QueryValue queryValue = new QueryValue(); queryValue.AndOr = ((type == this.AND) ? "AND" : "OR"); queryValue.Value = text; queryValue.Oper = this.operators3[selectedIndex2]; if (this.sqlDicts.ContainsKey(sqlKeys)) { this.sqlDicts[sqlKeys] = queryValue; } else { this.sqlDicts.Add(sqlKeys, queryValue); } } string text2 = null; for (int i = 0; i < this.sqlDicts.Keys.Count; i++) { string text3 = this.sqlDicts.Keys.ElementAt(i); QueryValue queryValue2 = this.sqlDicts[text3]; string text4 = text2; text2 = string.Concat(new string[] { text4, (i == 0) ? "" : queryValue2.AndOr, " ", text3, " ", queryValue2.Oper, " ", queryValue2.Value, " " }); } return(text2); }
public static List <ProductEntity> Query(QueryConditionEntity <QueryProduct> query) { return(ProductDA.Query(query)); }