namespace TProduct.WinFrmUI.TValve { public partial class ValveInfoCtrl : DevExpress.XtraEditors.XtraUserControl { public ValveInfoCtrl() { InitializeComponent(); } public void SetBindingData(TProduct.Model.ProductMainExValve valve, Model.PartBase part) { if (part == null) return; this.textEditValveSerise.Text = new BLL.ProductSeries().GetByID(valve.SeriesID)?.Name; this.textEditValveName.Text = valve?.Name; this.textEditValveCode.Text = valve?.Code; this.textEditDia.EditValue = valve?.Dia < 1 ? null : valve?.Dia; this.TextEditPartCode.Text = part.Code; this.TextEditPartName.Text = part.Name; this.textEditMfName.Text = new BLL.ManufacturerBase().GetByID(part.ManufacturerID)?.ShortName; this.textEditMfCreateTime.Text = part.ManufactureTime; this.textEditSd.Text = new BLL.Senderbase().GetByID(part.SenderID)?.ShortName; this.textEditSendTime.Text = part.SendTime; this.MemoEditNote.Text = part.Note; } } }