Browse Source

调整查询条件

master
wugang 7 years ago
parent
commit
0d6afd590a
1 changed files with 7 additions and 4 deletions
  1. +7
    -4
      BWP.B3_YunKen.Web/Pages/B3YunKen/Dialogs/ReturnInStore_CustomerAcceptDialog.cs

+ 7
- 4
BWP.B3_YunKen.Web/Pages/B3YunKen/Dialogs/ReturnInStore_CustomerAcceptDialog.cs View File

@ -232,12 +232,15 @@ namespace BWP.Web.Pages.B3YunKen.Dialogs
dom.Columns.Add(DQSelectColumn.Field("BrandItem_Name", notedetail)); dom.Columns.Add(DQSelectColumn.Field("BrandItem_Name", notedetail));
dom.Where.Conditions.Add(DQCondition.EQ(dom.From.RootSource.Alias, "Domain_ID", DomainContext.Current.ID)); dom.Where.Conditions.Add(DQCondition.EQ(dom.From.RootSource.Alias, "Domain_ID", DomainContext.Current.ID));
dom.Where.Conditions.Add(DQCondition.EQ(dom.From.RootSource.Alias, "AccountingUnit_ID", AccountingUnit_ID));
if(AccountingUnit_ID != null)
dom.Where.Conditions.Add(DQCondition.EQ(dom.From.RootSource.Alias, "AccountingUnit_ID", AccountingUnit_ID));
dom.Where.Conditions.Add(DQCondition.LessThan(DQExpression.IfNull(DQExpression.Field(returnInStoreData, "UnitNum"), DQExpression.Value(0)), DQExpression.Field(notedetail, "UnitNum"))); dom.Where.Conditions.Add(DQCondition.LessThan(DQExpression.IfNull(DQExpression.Field(returnInStoreData, "UnitNum"), DQExpression.Value(0)), DQExpression.Field(notedetail, "UnitNum")));
if (Request.QueryString["Customer_ID"] != "")
{
dom.Where.Conditions.Add(DQCondition.EQ(dom.From.RootSource.Alias, "Customer_ID", long.Parse(Request["Customer_ID"])));
if (!IsPostBack) {
if (Request.QueryString["Customer_ID"] != "") {
dom.Where.Conditions.Add(DQCondition.EQ(dom.From.RootSource.Alias, "Customer_ID", long.Parse(Request["Customer_ID"])));
}
} }
return dom; return dom;
} }
} }


Loading…
Cancel
Save