From 0d6afd590a8b643fbcf92d8479412a9e9cff0fe0 Mon Sep 17 00:00:00 2001 From: wugang <425674808@qq.com> Date: Fri, 9 Mar 2018 15:16:35 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=9F=A5=E8=AF=A2=E6=9D=A1?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Dialogs/ReturnInStore_CustomerAcceptDialog.cs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/BWP.B3_YunKen.Web/Pages/B3YunKen/Dialogs/ReturnInStore_CustomerAcceptDialog.cs b/BWP.B3_YunKen.Web/Pages/B3YunKen/Dialogs/ReturnInStore_CustomerAcceptDialog.cs index 66b12c3..ded8d4c 100644 --- a/BWP.B3_YunKen.Web/Pages/B3YunKen/Dialogs/ReturnInStore_CustomerAcceptDialog.cs +++ b/BWP.B3_YunKen.Web/Pages/B3YunKen/Dialogs/ReturnInStore_CustomerAcceptDialog.cs @@ -232,12 +232,15 @@ namespace BWP.Web.Pages.B3YunKen.Dialogs 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, "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"))); - 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; } }