|
|
|
@ -40,14 +40,7 @@ namespace BWP.Web.Pages.B3YunKen.Bill |
|
|
|
private DFBrowseGrid _grid; |
|
|
|
private QueryContainer mQueryContainer; |
|
|
|
private DFContainer dfContainer; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private DFBoolComboBox _sortType; |
|
|
|
|
|
|
|
uint QueryID |
|
|
|
{ |
|
|
|
@ -218,12 +211,15 @@ namespace BWP.Web.Pages.B3YunKen.Bill |
|
|
|
{ |
|
|
|
dom.Where.Conditions.EFieldInList(DQExpression.Field(main, "PriceClass_ID"), _priceClass.GetValues()); |
|
|
|
} |
|
|
|
if (_sortType.Value != null) |
|
|
|
dom.OrderBy.Expressions.Add(DQOrderByExpression.Create(detail, "Goods_Name", _sortType.Value == true ? false : true)); |
|
|
|
return dom; |
|
|
|
} |
|
|
|
|
|
|
|
private void CreateBrowseGrid(VLayoutPanel vPanel) |
|
|
|
{ |
|
|
|
vPanel.Add(new TSButton("通过", delegate { |
|
|
|
var hPanel = vPanel.Add(new HLayoutPanel(), new VLayoutOption(HorizontalAlign.Left)); |
|
|
|
hPanel.Add(new TSButton("通过", delegate { |
|
|
|
_grid.GetFromUI(); |
|
|
|
using (var context = new TransactionContext()) |
|
|
|
{ |
|
|
|
@ -236,7 +232,8 @@ namespace BWP.Web.Pages.B3YunKen.Bill |
|
|
|
} |
|
|
|
AspUtil.Alert(this, "操作成功\n" + BIFactory.GetLastMessage()); |
|
|
|
_grid.DataBind(); |
|
|
|
}), new VLayoutOption(HorizontalAlign.Left)); |
|
|
|
})); |
|
|
|
AddSortChoiceBox(hPanel); |
|
|
|
_grid = vPanel.Add(new DFBrowseGrid(new DFDataTableEditor())); |
|
|
|
_grid.Width = Unit.Percentage(100); |
|
|
|
_grid.GridSubKey = "Grid"; |
|
|
|
@ -290,6 +287,23 @@ namespace BWP.Web.Pages.B3YunKen.Bill |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
private void AddSortChoiceBox(HLayoutPanel hPanel) |
|
|
|
{ |
|
|
|
var label = new SimpleLabel { |
|
|
|
Text = "排序方式" |
|
|
|
}; |
|
|
|
hPanel.Add(label); |
|
|
|
_sortType = new DFBoolComboBox("升序", "降序") { |
|
|
|
AutoPostBack = true, |
|
|
|
TrueIsFirst = true |
|
|
|
}; |
|
|
|
hPanel.Add(_sortType); |
|
|
|
_sortType.ValueChanged += delegate { |
|
|
|
_grid.Query = CreateQueryGridQuery(); |
|
|
|
_grid.DataBind(); |
|
|
|
}; |
|
|
|
} |
|
|
|
|
|
|
|
private void DoApproval(DFDataRow row, bool pass, IPriceBillBL bl) |
|
|
|
{ |
|
|
|
var Price = (Money<decimal>?)row["Price"]; |
|
|
|
|