public EditForm() { InitializeComponent(); this.ncc_Customer.Choose = new Settings.BasicData.Customs.ChooseCustoms(); this.requireValueExceptions.Add(Model.PackingListHeader.PRO_PackingNo, new AA("PackingNo 不能為空!", this.txt_PackingNo)); this.requireValueExceptions.Add(Model.PackingListHeader.PRO_PackingDate, new AA("Date 不能為空!", this.Date_PackingDate)); this.requireValueExceptions.Add(Model.PackingListHeader.PRO_CustomerId, new AA("CONSIGNEE 不能為空!", this.ncc_Customer)); this.requireValueExceptions.Add(Model.PackingListHeader.PRO_PerSS, new AA("PerSS 不能為空!", this.txt_PerSS)); this.requireValueExceptions.Add(Model.PackingListHeader.PRO_SailingOnOrAbout, new AA("SailingOnOrAbout 不能為空!", this.date_Sailing)); this.requireValueExceptions.Add(Model.PackingListHeader.PRO_FromPortId, new AA("From 不能為空!", this.lue_From)); this.requireValueExceptions.Add(Model.PackingListHeader.PRO_ToPortId, new AA("TO 不能為空!", this.lue_TO)); this.requireValueExceptions.Add(Model.PackingListDetail.PRO_PLTNo, new AA("PLTNo 不能為空!", this.gridControl3)); this.requireValueExceptions.Add(Model.PackingListDetail.PRO_CartonNo, new AA("CartonNo 不能為空!", this.gridControl3)); this.action = "view"; this.gridControl3.Dock = DockStyle.Fill; //设置单位 this.bindingSourcePort.DataSource = portManager.Select(); var unitList = new BL.ProductUnitManager().Select().GroupBy(U => U.CnName).Select(D => D.Key).ToList(); unitList.ForEach(U => { this.cob_Unit.Properties.Items.Add(U); }); }
public EditFormInvoice() { InitializeComponent(); this.ncc_Customer.Choose = new Settings.BasicData.Customs.ChooseCustoms(); this.requireValueExceptions.Add(Model.PackingInvoiceHeader.PRO_InvoiceNo, new AA("InvoiceNo 不能為空!", this.txt_InvoiceNo)); this.requireValueExceptions.Add(Model.PackingInvoiceHeader.PRO_InvoiceDate, new AA("Date 不能為空!", this.Date_InvoiceDate)); this.requireValueExceptions.Add(Model.PackingInvoiceDetail.PRO_Number, new AA("No 不能為空!", this.gridControl3)); this.action = "view"; this.bindingSourcePort.DataSource = portManager.Select(); //设置单位 this.bindingSourcePort.DataSource = portManager.Select(); var unitList = new BL.ProductUnitManager().Select().GroupBy(U => U.CnName).Select(D => D.Key).ToList(); unitList.ForEach(U => { this.cob_Unit.Properties.Items.Add(U); }); }