You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

65 lines
2.3 KiB

using BWP.B3ButcherManage.BO;
using BWP.Web.Pages.B3ButcherManage.Bills.StatPay_;
using BWP.Web.WebControls;
using Forks.EnterpriseServices.DataForm;
using Forks.EnterpriseServices.DomainObjects2.DQuery;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.UI.WebControls;
using TSingSoft.WebControls2;
using TSingSoft.WebPluginFramework;
namespace BWP.Web.Pages.B3QingDaoWanFu.Overlays
{
class StatPayEdit_Ext : StatPayEdit
{
protected override void CustomerConfig(Layout.AutoLayoutConfig config)
{
var tag = config.Items.FirstOrDefault(x => x.Key == "WeightSumRate");
if (tag != null)
tag.Key = "WeightSumRate2";
}
DFEditGrid _farmerGrid;
protected override void AddFarmerDetail(System.Web.UI.Control control)
{
var panel = control.EAdd(new TitlePanel("养殖户信息", "养殖户信息"));
var editor = new DFCollectionEditor<Weigh_FarmerDetail>(() => Dmo.FarmerDetails);
editor.AllowDeletionFunc = () => false;
editor.CanDeleteFunc = detail => false;
editor.IsEditableFunc = (field, detail) => {
return CanSave && field.Name == "ExtMoney";
};
_farmerGrid = panel.EAdd(new DFEditGrid(editor) { Width = Unit.Percentage(100), ShowLineNo = true });
_farmerGrid.Columns.Add(new DFEditGridColumn("Farmer_Name"));
_farmerGrid.Columns.Add(new DFEditGridColumn("Farmer_IDCard"));
_farmerGrid.Columns.Add(new DFEditGridColumn("Farmer_BankAccount"));
_farmerGrid.Columns.Add(new DFEditGridColumn("Farmer_Address"));
_farmerGrid.Columns.Add(new DFEditGridColumn("Farmer_Tel"));
_farmerGrid.Columns.Add(new DFEditGridColumn("Number"));
_farmerGrid.Columns.Add(new DFEditGridColumn("ExeWeight"));
_farmerGrid.Columns.Add(new DFEditGridColumn("ExtMoney"));
var section4 = mPageLayoutManager.AddSection("detailColumns4", "养殖户信息");
section4.ApplyLayout(_farmerGrid, mPageLayoutManager, DFInfo.Get(typeof(Weigh_FarmerDetail)));
panel.SetPageLayoutSetting(mPageLayoutManager, section4.Name);
}
public override void GetFromUI()
{
base.GetFromUI();
_farmerGrid.GetFromUI();
}
public override void AppToUI()
{
base.AppToUI();
mDFContainer.MakeReadonly("ShackMoney");
_farmerGrid.DataBind();
}
}
}