|
|
|
@ -1,31 +1,78 @@ |
|
|
|
using BWP.B3SubstituteKill.BL; |
|
|
|
using BWP.B3SubstituteKill.BO; |
|
|
|
using BWP.Web.Layout; |
|
|
|
using BWP.Web.WebControls; |
|
|
|
using Forks.EnterpriseServices.DataForm; |
|
|
|
using System; |
|
|
|
using System.Collections.Generic; |
|
|
|
using System.Linq; |
|
|
|
using System.Text; |
|
|
|
using System.Web.UI; |
|
|
|
using System.Web.UI.WebControls; |
|
|
|
using TSingSoft.WebControls2; |
|
|
|
using Forks.Utils.Collections; |
|
|
|
|
|
|
|
namespace BWP.Web.Pages.B3SubstituteKill.BaseInfos.SubKillFlag_ |
|
|
|
{ |
|
|
|
class SubKillFlagEdit : DomainBaseInfoEditPage<SubKillFlag, ISubKillFlagBL> |
|
|
|
{ |
|
|
|
protected override void BuildBody(Control form) |
|
|
|
protected override void BuildBasePropertiesEditor(TitlePanel titlePanel, CustomPageLayout.PageLayoutSection pageLayoutSection) |
|
|
|
{ |
|
|
|
var vPanel = new VLayoutPanel(); |
|
|
|
form.Controls.Add(vPanel); |
|
|
|
var panel = new LayoutManager("", mDFInfo, mDFContainer); |
|
|
|
var layoutManager = new LayoutManager("", mDFInfo, mDFContainer); |
|
|
|
|
|
|
|
var config = new AutoLayoutConfig(); |
|
|
|
config.Add("AccountingUnit_ID"); |
|
|
|
config.Add("Supplier_ID"); |
|
|
|
config.Add("Name"); |
|
|
|
config.Add("Remark"); |
|
|
|
panel.Config = config; |
|
|
|
vPanel.Add(panel.CreateLayout()); |
|
|
|
layoutManager.Config = config; |
|
|
|
pageLayoutSection.ApplyLayout(layoutManager, config, mPageLayoutManager, mDFInfo); |
|
|
|
titlePanel.Controls.Add(layoutManager.CreateLayout()); |
|
|
|
} |
|
|
|
|
|
|
|
protected override void BuildBody(System.Web.UI.Control parent) |
|
|
|
{ |
|
|
|
base.BuildBody(parent); |
|
|
|
AddDetail(parent.EAdd(new TitlePanel("标识明细", "标识明细"))); |
|
|
|
} |
|
|
|
|
|
|
|
DFEditGrid _detailGrid; |
|
|
|
private void AddDetail(TitlePanel titlePanel) |
|
|
|
{ |
|
|
|
if (CanSave) |
|
|
|
{ |
|
|
|
titlePanel.EAdd(new TSButton("新增", delegate |
|
|
|
{ |
|
|
|
_detailGrid.GetFromUI(); |
|
|
|
Dmo.Details.Add(new SubKillFlag_Detail()); |
|
|
|
_detailGrid.DataBind(); |
|
|
|
})); |
|
|
|
} |
|
|
|
|
|
|
|
var editor = new DFCollectionEditor<SubKillFlag_Detail>(() => Dmo.Details); |
|
|
|
editor.AllowDeletionFunc = () => CanSave; |
|
|
|
editor.CanDeleteFunc = detail => CanSave; |
|
|
|
editor.IsEditableFunc = (field, detail) => CanSave; |
|
|
|
_detailGrid = titlePanel.EAdd(new DFEditGrid(editor) { Width = Unit.Percentage(100) }); |
|
|
|
|
|
|
|
_detailGrid.Columns.EAdd(new DFEditGridColumn<DFTextBox>("Name")).InitEditControl += (sender, e) => { |
|
|
|
e.Control.Style["width"] = "400px"; |
|
|
|
}; |
|
|
|
var section = mPageLayoutManager.AddSection("Detail", "标识明细"); |
|
|
|
titlePanel.SetPageLayoutSetting(mPageLayoutManager, section.Name); |
|
|
|
|
|
|
|
section.ApplyLayout(_detailGrid, mPageLayoutManager, DFInfo.Get(typeof(SubKillFlag_Detail))); |
|
|
|
} |
|
|
|
|
|
|
|
public override void AppToUI() |
|
|
|
{ |
|
|
|
base.AppToUI(); |
|
|
|
_detailGrid.DataBind(); |
|
|
|
} |
|
|
|
|
|
|
|
public override void GetFromUI() |
|
|
|
{ |
|
|
|
base.GetFromUI(); |
|
|
|
_detailGrid.GetFromUI(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |