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; } }