| @ -1,51 +0,0 @@ | |||
| using BWP.B3SheepButcherManage; | |||
| using BWP.B3SheepButcherManage.BL; | |||
| using BWP.B3SheepButcherManage.BO; | |||
| using BWP.Web.CustomPageLayout; | |||
| using BWP.Web.Layout; | |||
| using BWP.Web.Utils; | |||
| using BWP.Web.WebControls; | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.Linq; | |||
| using System.Text; | |||
| using TSingSoft.WebControls2; | |||
| namespace BWP.Web.Pages.B3SheepButcherManage.BaseInfos.Livestock_ | |||
| { | |||
| class LivestockEdit : BaseInfoEditPage<Livestock, ILivestockBL> | |||
| { | |||
| protected override void BuildBasePropertiesEditor(TitlePanel titlePanel, PageLayoutSection pageLayoutSection) | |||
| { | |||
| var layoutManager = new LayoutManager("", mDFInfo, mDFContainer); | |||
| layoutManager.Add("GoodsProperty_ID", InputCreator.DFChoiceBox(B3SheepButcherManageConsts.DataSources.可屠宰存货属性, "GoodsProperty_Name")); | |||
| var config = new AutoLayoutConfig(); | |||
| layoutManager.Config = config; | |||
| config.Add("GoodsProperty_ID"); | |||
| config.Add("Name"); | |||
| config.Add("Code"); | |||
| config.Add("LiveVarieties_ID"); | |||
| config.Add("Shortcut"); | |||
| config.Add("SortNum"); | |||
| config.Add("PrintShortName"); | |||
| config.Add("Spec"); | |||
| config.Add("Feature"); | |||
| config.Add("Origin"); | |||
| config.Add("Brand"); | |||
| config.Add("TaxRate"); | |||
| config.Add("MainUnit"); | |||
| config.Add("SecondUnit"); | |||
| config.Add("Remark"); | |||
| pageLayoutSection.SetRequired("GoodsProperty_ID", "Name", "Code"); | |||
| pageLayoutSection.ApplyLayout(layoutManager, config, mPageLayoutManager, mDFInfo); | |||
| titlePanel.Controls.Add(layoutManager.CreateLayout()); | |||
| } | |||
| } | |||
| } | |||
| @ -1,53 +0,0 @@ | |||
| using BWP.B3Frameworks.Utils; | |||
| using BWP.B3SheepButcherManage; | |||
| using BWP.B3SheepButcherManage.BL; | |||
| using BWP.B3SheepButcherManage.BO; | |||
| using BWP.B3UnitedInfos.BO; | |||
| using BWP.Web.Utils; | |||
| using Forks.EnterpriseServices.DomainObjects2; | |||
| using Forks.EnterpriseServices.DomainObjects2.DQuery; | |||
| using Forks.EnterpriseServices.SqlDoms; | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.Linq; | |||
| using System.Text; | |||
| using TSingSoft.WebControls2; | |||
| namespace BWP.Web.Pages.B3SheepButcherManage.BaseInfos.Livestock_ | |||
| { | |||
| class LivestockList : BaseInfoListPage<Livestock, ILivestockBL> | |||
| { | |||
| protected override DQueryDom GetQueryDom() | |||
| { | |||
| var dom = base.GetQueryDom(); | |||
| var prop = new JoinAlias(typeof(GoodsProperty)); | |||
| dom.From.AddJoin(JoinType.Inner, new DQDmoSource(prop), DQCondition.EQ(prop, "ID", dom.From.RootSource.Alias, "GoodsProperty_ID")); | |||
| dom.Where.Conditions.Add(DQCondition.EQ(prop, "IsButchery", true)); | |||
| dom.OrderBy.Expressions.Add(DQOrderByExpression.Create("SortNum", false)); | |||
| DomainUtil.AddDomainPermissionLimit(dom, typeof(GoodsProperty), prop); | |||
| return dom; | |||
| } | |||
| protected override void AddQueryControls(VLayoutPanel vPanel) | |||
| { | |||
| vPanel.Add(CreateDefaultBaseInfoQueryControls((layoutManager, config) => | |||
| { | |||
| layoutManager.Add("GoodsProperty_ID", QueryCreator.DFChoiceBox(mDFInfo.Fields["GoodsProperty_ID"], B3SheepButcherManageConsts.DataSources.可屠宰存货属性)); | |||
| config.AddAfter("GoodsProperty_ID", "ID"); | |||
| config.Add("LiveVarieties_ID"); | |||
| })); | |||
| } | |||
| protected override void AddDFBrowseGridColumn(DFBrowseGrid grid, string field) | |||
| { | |||
| base.AddDFBrowseGridColumn(grid, field); | |||
| if (field == "Name") | |||
| { | |||
| AddDFBrowseGridColumn(grid, "LiveVarieties_Name"); | |||
| AddDFBrowseGridColumn(grid, "SortNum"); | |||
| } | |||
| } | |||
| } | |||
| } | |||
| @ -1,55 +0,0 @@ | |||
| <?xml version="1.0" encoding="utf-8" ?> | |||
| <Select xmlns="urn:XDQuery"> | |||
| <Columns> | |||
| <Field name="ID"/> | |||
| </Columns> | |||
| <From> | |||
| <DmoClass class="BWP.B3SheepButcherManage.BO.Livestock, B3SheepButcherManage"/> | |||
| </From> | |||
| <Where> | |||
| <And> | |||
| <EQ> | |||
| <Field name="ID"/> | |||
| <QBE paramName="ID"/> | |||
| </EQ> | |||
| <EQ> | |||
| <Field name="GoodsProperty_ID"/> | |||
| <QBE paramName="GoodsProperty_ID"/> | |||
| </EQ> | |||
| <EQ> | |||
| <Field name="LiveVarieties_ID"/> | |||
| <QBE paramName="LiveVarieties_ID"/> | |||
| </EQ> | |||
| <Or> | |||
| <Contains> | |||
| <Field name="Name"/> | |||
| <QBE paramName="Name"/> | |||
| </Contains> | |||
| <Contains> | |||
| <Field name="Spell"/> | |||
| <QBE paramName="Name"/> | |||
| </Contains> | |||
| </Or> | |||
| <Contains> | |||
| <Field name="Code"/> | |||
| <QBE paramName="Code"/> | |||
| </Contains> | |||
| <Contains> | |||
| <Field name="Brand"/> | |||
| <QBE paramName="Brand"/> | |||
| </Contains> | |||
| <EQ> | |||
| <Field name="Stopped"/> | |||
| <QBE paramName="Stopped"/> | |||
| </EQ> | |||
| <EQ> | |||
| <Field name="IsLocked"/> | |||
| <QBE paramName="IsLocked"/> | |||
| </EQ> | |||
| <Contains> | |||
| <Field name="Remark"/> | |||
| <QBE paramName="Remark"/> | |||
| </Contains> | |||
| </And> | |||
| </Where> | |||
| </Select> | |||
| @ -1,32 +0,0 @@ | |||
| using BWP.B3Frameworks.BL; | |||
| using BWP.B3SheepButcherManage.BO; | |||
| using Forks.EnterpriseServices; | |||
| using Forks.EnterpriseServices.BusinessInterfaces; | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.Linq; | |||
| using System.Text; | |||
| namespace BWP.B3SheepButcherManage.BL | |||
| { | |||
| [BusinessInterface(typeof(LivestockBL))] | |||
| [LogicName("级别")] | |||
| public interface ILivestockBL : IBaseInfoBL<Livestock> | |||
| { | |||
| } | |||
| public class LivestockBL : BaseInfoBL<Livestock>, ILivestockBL | |||
| { | |||
| protected override void beforeSave(Livestock dmo) | |||
| { | |||
| if (dmo.GoodsProperty_ID == null) | |||
| { | |||
| throw new Exception("必须设置畜类属性(存货属性)"); | |||
| } | |||
| base.beforeSave(dmo); | |||
| } | |||
| } | |||
| } | |||
| @ -1,25 +0,0 @@ | |||
| using BWP.B3Frameworks; | |||
| using BWP.B3ProduceUnitedInfos; | |||
| using BWP.B3ProduceUnitedInfos.BO; | |||
| using BWP.B3ProduceUnitedInfos.NamedValueTemplate; | |||
| using Forks.EnterpriseServices; | |||
| using Forks.EnterpriseServices.DataForm; | |||
| using Forks.EnterpriseServices.DomainObjects2; | |||
| using Forks.Utils; | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.Linq; | |||
| using System.Text; | |||
| namespace BWP.B3SheepButcherManage.BO | |||
| { | |||
| [DFClass, Serializable] | |||
| [LogicName("级别")] | |||
| [MapToTable("B3UnitedInfos_Goods")] | |||
| [DmoTypeID(B3FrameworksConsts.DmoTypeIDBases.B3SheepButcherManage, B3SheepButcherManageConsts.DmoTypeIDOffsets.Livestock)] | |||
| [DFCPrompt("畜类属性", Property = "GoodsProperty_ID")] | |||
| [DFCPrompt("畜类属性", Property = "GoodsProperty_Name")] | |||
| public class Livestock : B3ProduceUnitedInfos.BO.GoodsExt | |||
| { | |||
| } | |||
| } | |||