| @ -0,0 +1,80 @@ | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.Linq; | |||
| using System.Text; | |||
| using BWP.B3Frameworks; | |||
| using BWP.B3Frameworks.BO.MoneyTemplate; | |||
| using BWP.B3SubstituteKill.BO; | |||
| using BWP.Web.Utils; | |||
| using Forks.EnterpriseServices.DataForm; | |||
| using Forks.EnterpriseServices.DomainObjects2.DQuery; | |||
| using Forks.Utils; | |||
| using Forks.Utils.Collections; | |||
| using TSingSoft.WebControls2; | |||
| namespace BWP.Web.Pages.B3SubstituteKill.Bills.SubKillGathering_ | |||
| { | |||
| class SelectStatPayDialog : DmoMultiSelectDialog<StatPay, SubKillGathering_Detail> | |||
| { | |||
| long _supplierID; | |||
| protected override void InitForm(System.Web.UI.HtmlControls.HtmlForm form) | |||
| { | |||
| _supplierID = Convert.ToInt64(Request.QueryString["Supplier_ID"]); | |||
| base.InitForm(form); | |||
| } | |||
| protected override void CreateQuery(VLayoutPanel vPanel) | |||
| { | |||
| var tablePanel = new TableLayoutPanel(10, 1); | |||
| tablePanel.Add(0, 1, 0, 1, new SimpleLabel("过磅单号")); | |||
| tablePanel.Add(1, 2, 0, 1, mQueryContainer.Add(new DFTextBox(mDFInfo.Fields["Weigh_ID"]), "Weigh_ID")); | |||
| tablePanel.Add(2, 3, 0, 1, new SimpleLabel("结算单号")); | |||
| tablePanel.Add(3, 4, 0, 1, mQueryContainer.Add(new DFTextBox(mDFInfo.Fields["ID"]), "ID")); | |||
| tablePanel.Add(4, 5, 0, 1, new SimpleLabel("结算日期")); | |||
| tablePanel.Add(5, 6, 0, 1, QueryCreator.DateRange(mDFInfo.Fields["Date"], mQueryContainer, "MinDate", "MaxDate")); | |||
| vPanel.Add(tablePanel); | |||
| base.CreateQuery(vPanel); | |||
| } | |||
| protected override DQueryDom GetQueryDom() | |||
| { | |||
| var query = mQueryContainer.Build(); | |||
| var bill = query.From.RootSource.Alias; | |||
| query.Where.Conditions.Add(DQCondition.GreaterThan(DQExpression.Field("ReceiveMoney"), DQExpression.IfNull(DQExpression.Field("AlreadyReceiveMoney"), DQExpression.ConstValue(0)))); | |||
| query.Where.Conditions.Add(DQCondition.EQ("Supplier_ID", _supplierID)); | |||
| query.EAddCheckedCondition(bill); | |||
| query.Where.Conditions.Add(DQCondition.EQ("Domain_ID", DomainContext.Current.ID)); | |||
| return query; | |||
| } | |||
| protected override void SetResultFromDFDataRow(SubKillGathering_Detail dmo, DFDataRow row) | |||
| { | |||
| dmo.StatPay_ID = (long?)row["ID"]; | |||
| dmo.Weigh_ID = (long?)row["Weigh_ID"]; | |||
| dmo.WeighTime = (DateTime?)row["WeighTime"]; | |||
| dmo.StatPay_Date = (DateTime?)row["Date"]; | |||
| dmo.StatPay_ReceiveMoney = (Money<金额>?)row["ReceiveMoney"]; | |||
| dmo.AlreadyReceiveMoney = (Money<金额>?)row["AlreadyReceiveMoney"]; | |||
| dmo.ThisReceiveMoney = (dmo.StatPay_ReceiveMoney ?? 0) - (dmo.AlreadyReceiveMoney ?? 0); | |||
| } | |||
| protected override void CreateQueryGridColumns(DFBrowseGrid grid) | |||
| { | |||
| grid.Columns.EAdd(new DFBrowseGridColumn("ID")).HeaderText = "结算单"; | |||
| grid.Columns.EAdd(new DFBrowseGridColumn("Supplier_Name")); | |||
| grid.Columns.EAdd(new DFBrowseGridColumn("Date")).HeaderText = "结算日期"; | |||
| grid.Columns.Add(new DFBrowseGridColumn("Weigh_ID")); | |||
| grid.Columns.Add(new DFBrowseGridColumn("WeighTime")); | |||
| grid.Columns.Add(new DFBrowseGridColumn("ReceiveMoney")); | |||
| grid.Columns.Add(new DFBrowseGridColumn("AlreadyReceiveMoney")); | |||
| grid.Columns.Add(new DFBrowseGridColumn("Remark")); | |||
| } | |||
| } | |||
| } | |||
| @ -0,0 +1,76 @@ | |||
| <?xml version="1.0" encoding="utf-8" ?> | |||
| <Select xmlns="urn:XDQuery"> | |||
| <Columns> | |||
| <Field name="ID"/> | |||
| </Columns> | |||
| <From> | |||
| <DmoClass class="BWP.B3SubstituteKill.BO.StatPay, B3SubstituteKill"/> | |||
| </From> | |||
| <Where> | |||
| <And> | |||
| <EQ> | |||
| <Field name="ID"/> | |||
| <QBE paramName="ID"/> | |||
| </EQ> | |||
| <EQ> | |||
| <Field name="Supplier_ID"/> | |||
| <QBE paramName="Supplier_ID"/> | |||
| </EQ> | |||
| <EQ> | |||
| <Field name="AccountingUnit_ID"/> | |||
| <QBE paramName="AccountingUnit_ID"/> | |||
| </EQ> | |||
| <EQ> | |||
| <Field name="Department_ID"/> | |||
| <QBE paramName="Department_ID"/> | |||
| </EQ> | |||
| <EQ> | |||
| <Field name="Employee_ID"/> | |||
| <QBE paramName="Employee_ID"/> | |||
| </EQ> | |||
| <EQ> | |||
| <Field name="IsLocked"/> | |||
| <QBE paramName="IsLocked"/> | |||
| </EQ> | |||
| <EQ> | |||
| <Field name="Weigh_ID"/> | |||
| <QBE paramName="Weigh_ID"/> | |||
| </EQ> | |||
| <Contains> | |||
| <Field name="Remark"/> | |||
| <QBE paramName="Remark"/> | |||
| </Contains> | |||
| <Contains> | |||
| <Field name="CreateUser_Name"/> | |||
| <QBE paramName="CreateUser_Name"/> | |||
| </Contains> | |||
| <Contains> | |||
| <Field name="CheckUser_Name"/> | |||
| <QBE paramName="CheckUser_Name"/> | |||
| </Contains> | |||
| <GreaterThanOrEqual> | |||
| <Field name="CreateTime"/> | |||
| <QBE paramName="MinCreateTime" /> | |||
| </GreaterThanOrEqual> | |||
| <LessThanOrEqual> | |||
| <Field name="CreateTime"/> | |||
| <QBE paramName="MaxCreateTime"/> | |||
| </LessThanOrEqual> | |||
| <GreaterThanOrEqual> | |||
| <Field name="Date"/> | |||
| <QBE paramName="MinDate" /> | |||
| </GreaterThanOrEqual> | |||
| <LessThanOrEqual> | |||
| <Field name="Date"/> | |||
| <QBE paramName="MaxDate"/> | |||
| </LessThanOrEqual> | |||
| <EQ> | |||
| <Field name="BillState"/> | |||
| <QBE paramName ="BillState"/> | |||
| </EQ> | |||
| </And> | |||
| </Where> | |||
| </Select> | |||
| @ -0,0 +1,155 @@ | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.Linq; | |||
| using System.Text; | |||
| using System.Web.UI.WebControls; | |||
| using BWP.B3SubstituteKill.BL; | |||
| using BWP.B3SubstituteKill.BO; | |||
| using BWP.Web.Layout; | |||
| using BWP.Web.Utils; | |||
| using BWP.Web.WebControls; | |||
| using Forks.EnterpriseServices.DataForm; | |||
| using Forks.Utils.Collections; | |||
| using TSingSoft.WebControls2; | |||
| namespace BWP.Web.Pages.B3SubstituteKill.Bills.SubKillGathering_ | |||
| { | |||
| class SubKillGatheringEdit : DepartmentWorkFlowBillEditPage<SubKillGathering, ISubKillGatheringBL> | |||
| { | |||
| protected override void BuildBasePropertiesEditor(TitlePanel titlePanel, CustomPageLayout.PageLayoutSection pageLayoutSection) | |||
| { | |||
| var layoutManager = new LayoutManager("", mDFInfo, mDFContainer); | |||
| var config = new AutoLayoutConfig(); | |||
| config.Add("AccountingUnit_ID"); | |||
| config.Add("Department_ID"); | |||
| config.Add("Employee_ID"); | |||
| config.Add("Date"); | |||
| config.Add("Supplier_ID"); | |||
| config.Add("Supplier_Tel"); | |||
| config.Add("Supplier_Card_ID"); | |||
| config.Add("Supplier_Address"); | |||
| config.Add("Remark"); | |||
| layoutManager.Config = config; | |||
| pageLayoutSection.ApplyLayout(layoutManager, config, mPageLayoutManager, mDFInfo); | |||
| titlePanel.Controls.Add(layoutManager.CreateLayout()); | |||
| if (layoutManager.Contains("Supplier_ID")) | |||
| { | |||
| var supplierInput = layoutManager["Supplier_ID"].InputControl as DFChoiceBox; | |||
| if (supplierInput != null) | |||
| { | |||
| var script = @" | |||
| var txtValue =parseInt(__DFContainer.getValue('Supplier_ID')); | |||
| simpleRestCall('/MainSystem/B3SubstituteKill/Rpcs/SupplierRpc/GetSupplierAndPriceBillID',[txtValue,__DFContainer.getControl('Date').value], | |||
| function(result){ | |||
| if(typeof(result.Address)!='undefined') | |||
| { | |||
| __DFContainer.setValue('Supplier_Address',result.Address); | |||
| } | |||
| else | |||
| { | |||
| __DFContainer.setValue('Supplier_Address',''); | |||
| } | |||
| if(typeof(result.Tel)!='undefined') | |||
| { | |||
| __DFContainer.setValue('Supplier_Tel',result.Tel); | |||
| } | |||
| else | |||
| { | |||
| __DFContainer.setValue('Supplier_Tel',''); | |||
| } | |||
| if(typeof(result.Supplier_Card_ID)!='undefined') | |||
| { | |||
| __DFContainer.setValue('Supplier_Card_ID',result.Card_ID); | |||
| } | |||
| else | |||
| { | |||
| __DFContainer.setValue('Supplier_Card_ID',''); | |||
| } | |||
| },{ });"; | |||
| supplierInput.OnClientSelected = script; | |||
| } | |||
| } | |||
| } | |||
| protected override void BuildBody(System.Web.UI.Control parent) | |||
| { | |||
| base.BuildBody(parent); | |||
| AddCostDetail(parent.EAdd(new TitlePanel("收款明细", "收款明细"))); | |||
| } | |||
| DFEditGrid _detail; | |||
| private void AddCostDetail(TitlePanel titlePanel) | |||
| { | |||
| var vPanel = titlePanel.EAdd(new VLayoutPanel()); | |||
| AddToolbarControl(vPanel); | |||
| var editor = new DFCollectionEditor<SubKillGathering_Detail>(() => Dmo.Details); | |||
| editor.AllowDeletionFunc = () => CanSave; | |||
| editor.CanDeleteFunc = detail => CanSave; | |||
| editor.IsEditableFunc = (field, detail) => CanSave; | |||
| _detail = vPanel.Add(new DFEditGrid(editor) { Width = Unit.Percentage(100) }); | |||
| _detail.Columns.Add(new DFEditGridColumn<DFValueLabel>("StatPay_ID")); | |||
| _detail.Columns.Add(new DFEditGridColumn<DFValueLabel>("StatPay_Date")); | |||
| _detail.Columns.Add(new DFEditGridColumn<DFValueLabel>("Weigh_ID")); | |||
| _detail.Columns.EAdd(new DFEditGridColumn<DFValueLabel>("WeighTime")); | |||
| _detail.Columns.EAdd(new DFEditGridColumn<DFValueLabel>("StatPay_ReceiveMoney")); | |||
| _detail.Columns.EAdd(new DFEditGridColumn<DFValueLabel>("AlreadyReceiveMoney")); | |||
| _detail.Columns.EAdd(new DFEditGridColumn<DFTextBox>("ThisReceiveMoney")); | |||
| _detail.Columns.EAdd(new DFEditGridColumn<DFTextBox>("Remark")); | |||
| var section = mPageLayoutManager.AddSection("CostDetail", "收款明细"); | |||
| titlePanel.SetPageLayoutSetting(mPageLayoutManager, section.Name); | |||
| section.ApplyLayout(_detail, mPageLayoutManager, DFInfo.Get(typeof(SubKillGathering_Detail))); | |||
| } | |||
| private void AddToolbarControl(VLayoutPanel vPanel) | |||
| { | |||
| if (CanSave) | |||
| { | |||
| var hPanel = vPanel.Add(new HLayoutPanel(), new VLayoutOption(HorizontalAlign.Left)); | |||
| var dialogButton = hPanel.Add(new DialogButton | |||
| { | |||
| Text = "选择结算单", | |||
| Url = "SelectStatPayDialog.aspx?" | |||
| }); | |||
| dialogButton.BeforeClientClick = "var sid=__DFContainer.getValue('Supplier_ID'); if (sid == '') { alert('先选择供应商');return false;}"; | |||
| dialogButton.ClientDynamicParamGetter = "return 'Supplier_ID=' + __DFContainer.getValue('Supplier_ID')"; | |||
| dialogButton.Click += delegate { | |||
| _detail.GetFromUI(); | |||
| var details = DialogUtil.GetCachedObj<SubKillGathering_Detail>(this); | |||
| foreach (SubKillGathering_Detail detail in details) | |||
| { | |||
| if (Dmo.Details.Any(x => x.StatPay_ID == detail.StatPay_ID)) | |||
| continue; | |||
| Dmo.Details.Add(detail); | |||
| } | |||
| _detail.DataBind(); | |||
| }; | |||
| } | |||
| } | |||
| public override void AppToUI() | |||
| { | |||
| base.AppToUI(); | |||
| _detail.DataBind(); | |||
| } | |||
| public override void GetFromUI() | |||
| { | |||
| base.GetFromUI(); | |||
| _detail.GetFromUI(); | |||
| } | |||
| } | |||
| } | |||
| @ -0,0 +1,38 @@ | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.Linq; | |||
| using System.Text; | |||
| using BWP.B3SubstituteKill.BL; | |||
| using BWP.B3SubstituteKill.BO; | |||
| using TSingSoft.WebControls2; | |||
| namespace BWP.Web.Pages.B3SubstituteKill.Bills.SubKillGathering_ | |||
| { | |||
| class SubKillGatheringList : DomainBillListPage<SubKillGathering, ISubKillGatheringBL> | |||
| { | |||
| protected override void AddQueryControls(VLayoutPanel vPanel) | |||
| { | |||
| vPanel.Add(CreateDefaultBillQueryControls((panel, config) => | |||
| { | |||
| config.Add("AccountingUnit_ID"); | |||
| config.Add("Department_ID"); | |||
| config.Add("Employee_ID"); | |||
| config.Add("Date"); | |||
| config.Add("Supplier_ID"); | |||
| })); | |||
| } | |||
| protected override void AddDFBrowseGridColumn(DFBrowseGrid grid, string field) | |||
| { | |||
| base.AddDFBrowseGridColumn(grid, field); | |||
| if (field == "BillState") | |||
| { | |||
| AddDFBrowseGridColumn(grid, "AccountingUnit_Name"); | |||
| AddDFBrowseGridColumn(grid, "Department_Name"); | |||
| AddDFBrowseGridColumn(grid, "Employee_Name"); | |||
| AddDFBrowseGridColumn(grid, "Date"); | |||
| AddDFBrowseGridColumn(grid, "Supplier_Name"); | |||
| } | |||
| } | |||
| } | |||
| } | |||
| @ -0,0 +1,72 @@ | |||
| <?xml version="1.0" encoding="utf-8" ?> | |||
| <Select xmlns="urn:XDQuery"> | |||
| <Columns> | |||
| <Field name="ID"/> | |||
| </Columns> | |||
| <From> | |||
| <DmoClass class="BWP.B3SubstituteKill.BO.SubKillGathering, B3SubstituteKill"/> | |||
| </From> | |||
| <Where> | |||
| <And> | |||
| <EQ> | |||
| <Field name="ID"/> | |||
| <QBE paramName="ID"/> | |||
| </EQ> | |||
| <EQ> | |||
| <Field name="AccountingUnit_ID"/> | |||
| <QBE paramName="AccountingUnit_ID"/> | |||
| </EQ> | |||
| <EQ> | |||
| <Field name="Department_ID"/> | |||
| <QBE paramName="Department_ID"/> | |||
| </EQ> | |||
| <EQ> | |||
| <Field name="Employee_ID"/> | |||
| <QBE paramName="Employee_ID"/> | |||
| </EQ> | |||
| <EQ> | |||
| <Field name="Supplier_ID"/> | |||
| <QBE paramName="Supplier_ID"/> | |||
| </EQ> | |||
| <EQ> | |||
| <Field name="IsLocked"/> | |||
| <QBE paramName="IsLocked"/> | |||
| </EQ> | |||
| <Contains> | |||
| <Field name="Remark"/> | |||
| <QBE paramName="Remark"/> | |||
| </Contains> | |||
| <Contains> | |||
| <Field name="CreateUser_Name"/> | |||
| <QBE paramName="CreateUser_Name"/> | |||
| </Contains> | |||
| <Contains> | |||
| <Field name="CheckUser_Name"/> | |||
| <QBE paramName="CheckUser_Name"/> | |||
| </Contains> | |||
| <GreaterThanOrEqual> | |||
| <Field name="CreateTime"/> | |||
| <QBE paramName="MinCreateTime" /> | |||
| </GreaterThanOrEqual> | |||
| <LessThanOrEqual> | |||
| <Field name="CreateTime"/> | |||
| <QBE paramName="MaxCreateTime"/> | |||
| </LessThanOrEqual> | |||
| <GreaterThanOrEqual> | |||
| <Field name="Date"/> | |||
| <QBE paramName="MinDate" /> | |||
| </GreaterThanOrEqual> | |||
| <LessThanOrEqual> | |||
| <Field name="Date"/> | |||
| <QBE paramName="MaxDate"/> | |||
| </LessThanOrEqual> | |||
| <EQ> | |||
| <Field name="BillState"/> | |||
| <QBE paramName ="BillState"/> | |||
| </EQ> | |||
| </And> | |||
| </Where> | |||
| </Select> | |||
| @ -0,0 +1,81 @@ | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.Linq; | |||
| using System.Text; | |||
| using BWP.B3Frameworks; | |||
| using BWP.B3Frameworks.BL; | |||
| using BWP.B3Frameworks.BO.MoneyTemplate; | |||
| using BWP.B3SubstituteKill.BO; | |||
| using Forks.EnterpriseServices; | |||
| using Forks.EnterpriseServices.BusinessInterfaces; | |||
| using Forks.EnterpriseServices.DomainObjects2; | |||
| using Forks.EnterpriseServices.DomainObjects2.DQuery; | |||
| using Forks.EnterpriseServices.SqlDoms; | |||
| using Forks.Utils; | |||
| using TSingSoft.WebPluginFramework; | |||
| namespace BWP.B3SubstituteKill.BL | |||
| { | |||
| [BusinessInterface(typeof(SubKillGatheringBL))] | |||
| [LogicName("代宰收款")] | |||
| public interface ISubKillGatheringBL : IDepartmentWorkFlowBillBL<SubKillGathering> | |||
| { } | |||
| public class SubKillGatheringBL : DepartmentWorkFlowBillBL<SubKillGathering>, ISubKillGatheringBL | |||
| { | |||
| protected override void doCheck(SubKillGathering dmo) | |||
| { | |||
| // foreach (var detail in dmo.Details) | |||
| // { | |||
| // var notPayMoney = (detail.StatPay_ReceiveMoney ?? 0) - (detail.AlreadyReceiveMoney ?? 0); | |||
| // if ((detail.ThisReceiveMoney ?? 0) > notPayMoney) | |||
| // { | |||
| // throw new ApplicationException(string.Format("结算单No.{0} 本次收款金额{1}大于未收款金额{2}", detail.StatPay_ID, detail.ThisReceiveMoney, notPayMoney)); | |||
| // } | |||
| // } | |||
| base.doCheck(dmo); | |||
| UpdateStatPayMoney(dmo); | |||
| } | |||
| protected override void doUnCheck(SubKillGathering dmo) | |||
| { | |||
| base.doUnCheck(dmo); | |||
| UpdateStatPayMoney(dmo); | |||
| } | |||
| private void UpdateStatPayMoney(SubKillGathering dmo) | |||
| { | |||
| var statPayIds = dmo.Details.Select(x => x.StatPay_ID).ToList(); | |||
| var detail = new JoinAlias(typeof(SubKillGathering_Detail)); | |||
| var bill = new JoinAlias(typeof(SubKillGathering)); | |||
| var dom = new DQueryDom(detail); | |||
| dom.From.AddJoin(JoinType.Inner, new DQDmoSource(bill), DQCondition.EQ(bill, "ID", detail, "SubKillGathering_ID")); | |||
| dom.EAddCheckedCondition(bill); | |||
| dom.Where.Conditions.EFieldInList("StatPay_ID", statPayIds); | |||
| dom.Columns.Add(DQSelectColumn.Sum(detail, "ThisReceiveMoney")); | |||
| dom.Columns.Add(DQSelectColumn.Field("StatPay_ID", detail)); | |||
| dom.Columns.Add(DQSelectColumn.Sum(detail, "AlreadyReceiveMoney")); | |||
| dom.GroupBy.Expressions.Add(DQExpression.Field(detail, "StatPay_ID")); | |||
| var tupleList = dom.EExecuteList<Money<金额>?, long, Money<金额>?>(Session); | |||
| foreach (var statPayId in statPayIds) | |||
| { | |||
| // var money = tupleList.Sum(x => x.Item2 == statPayId ? ((x.Item1 ?? 0).Value+(x.Item3 ?? 0).Value) : 0m); | |||
| var money = tupleList.Sum(x => x.Item2 == statPayId ? (x.Item1 ?? 0).Value : 0m); | |||
| var update = new DQUpdateDom(typeof(StatPay)); | |||
| update.Columns.Add(new DQUpdateColumn("AlreadyReceiveMoney", money)); | |||
| update.Columns.Add(new DQUpdateColumn("RowVersion", | |||
| DQExpression.Add(DQExpression.Field("RowVersion"), DQExpression.ConstValue(1)))); | |||
| update.Where.Conditions.Add(DQCondition.EQ("ID", statPayId)); | |||
| Session.ExecuteNonQuery(update); | |||
| } | |||
| } | |||
| } | |||
| } | |||
| @ -0,0 +1,72 @@ | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.Linq; | |||
| using System.Text; | |||
| using BWP.B3Frameworks; | |||
| using BWP.B3Frameworks.Attributes; | |||
| using BWP.B3Frameworks.BO; | |||
| using BWP.B3ProcurementInterface.BO; | |||
| using BWP.B3ProcurementInterface.Utils; | |||
| using BWP.B3SubstituteKill.Utils; | |||
| using Forks.EnterpriseServices; | |||
| using Forks.EnterpriseServices.DataForm; | |||
| using Forks.EnterpriseServices.DomainObjects2; | |||
| using TSingSoft.WebControls2; | |||
| namespace BWP.B3SubstituteKill.BO | |||
| { | |||
| [DFClass, Serializable] | |||
| [LogicName("代宰收款")] | |||
| [DmoTypeID(B3FrameworksConsts.DmoTypeIDBases.B3SubstituteKill, B3SubstituteKillConsts.DmoTypeIDOffsets.SubKillGathering)] | |||
| [EditUrl("~/B3SubstituteKill/Bills/SubKillGathering_/SubKillGatheringEdit.aspx")] | |||
| public class SubKillGathering : DepartmentWorkFlowBill | |||
| { | |||
| private DateTime? date = DateTime.Now; | |||
| [LogicName("收款日期")] | |||
| [DFExtProperty("WebControlType", DFEditControl.DateInput)] | |||
| [DFNotEmpty] | |||
| public DateTime? Date | |||
| { | |||
| get { return date; } | |||
| set { date = value; } | |||
| } | |||
| [DFDataKind(B3ProcurementInterfaceDataSources.供应商用于屠宰场)] | |||
| [DFExtProperty(B3FrameworksConsts.DFExtProperties.DisplayField, "Supplier_Name")] | |||
| [DFExtProperty(B3FrameworksConsts.DFExtProperties.QueryDataKind, B3ProcurementInterfaceDataSources.供应商用于屠宰场全部)] | |||
| [DFExtProperty("WebControlType", DFEditControl.ChoiceBox)] | |||
| [DFPrompt("供应商")] | |||
| [DFNotEmpty] | |||
| public long? Supplier_ID { get; set; } | |||
| [ReferenceTo(typeof(Supplier), "Name")] | |||
| [Join("Supplier_ID", "ID")] | |||
| [DFPrompt("供应商")] | |||
| public string Supplier_Name { get; set; } | |||
| [ReferenceTo(typeof(Supplier), "Tel")] | |||
| [Join("Supplier_ID", "ID")] | |||
| [DFPrompt("联系方式")] | |||
| public string Supplier_Tel { get; set; } | |||
| [ReferenceTo(typeof(Supplier), "Card_ID")] | |||
| [Join("Supplier_ID", "ID")] | |||
| [DFPrompt("身份证号")] | |||
| public string Supplier_Card_ID { get; set; } | |||
| [ReferenceTo(typeof(Supplier), "Address")] | |||
| [Join("Supplier_ID", "ID")] | |||
| [DFPrompt("地址")] | |||
| public string Supplier_Address { get; set; } | |||
| private SubKillGathering_DetailCollection _mDetails = new SubKillGathering_DetailCollection(); | |||
| [OneToMany(typeof(SubKillGathering_Detail), "ID")] | |||
| [Join("ID", "SubKillGathering_ID")] | |||
| public SubKillGathering_DetailCollection Details | |||
| { | |||
| get { return _mDetails; } | |||
| set { _mDetails = value; } | |||
| } | |||
| } | |||
| } | |||
| @ -0,0 +1,61 @@ | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.Linq; | |||
| using System.Text; | |||
| using BWP.B3Frameworks.BO; | |||
| using BWP.B3Frameworks.BO.MoneyTemplate; | |||
| using Forks.EnterpriseServices; | |||
| using Forks.EnterpriseServices.DataForm; | |||
| using Forks.EnterpriseServices.DomainObjects2; | |||
| using Forks.Utils; | |||
| namespace BWP.B3SubstituteKill.BO | |||
| { | |||
| [DFClass, Serializable, LogicName("代宰收款_明细")] | |||
| public class SubKillGathering_Detail:Base | |||
| { | |||
| public long SubKillGathering_ID { get; set; } | |||
| [LogicName("结算单")] | |||
| public long? StatPay_ID { get; set; } | |||
| [LogicName("结算日期")] | |||
| [ReferenceTo(typeof(StatPay), "Date")] | |||
| [Join("StatPay_ID", "ID")] | |||
| public DateTime? StatPay_Date { get; set; } | |||
| [LogicName("过磅时间")] | |||
| [ReferenceTo(typeof(StatPay), "WeighTime")] | |||
| [Join("StatPay_ID", "ID")] | |||
| public DateTime? WeighTime { get; set; } | |||
| [LogicName("过磅单")] | |||
| [ReferenceTo(typeof(StatPay), "Weigh_ID")] | |||
| [Join("StatPay_ID", "ID")] | |||
| public long? Weigh_ID { get; set; } | |||
| [LogicName("应收金额")] | |||
| [ReferenceTo(typeof(StatPay), "ReceiveMoney")] | |||
| [Join("StatPay_ID", "ID")] | |||
| public Money<金额>? StatPay_ReceiveMoney { get; set; } | |||
| [LogicName("已收金额")] | |||
| public Money<金额>? AlreadyReceiveMoney { get; set; } | |||
| [LogicName("本次收款金额")] | |||
| public Money<金额>? ThisReceiveMoney { get; set; } | |||
| [LogicName("摘要")] | |||
| public string Remark { get; set; } | |||
| } | |||
| [Serializable] | |||
| public class SubKillGathering_DetailCollection : DmoCollection<SubKillGathering_Detail> | |||
| { } | |||
| } | |||