| | |
| | | |
| | | namespace HStation.WinFrmUI.Assets |
| | | { |
| | | public partial class EditThreeLinkMainDlg : DevExpress.XtraEditors.XtraForm |
| | | public partial class EditAssetsThreelinkMainDlg : DevExpress.XtraEditors.XtraForm |
| | | { |
| | | public EditThreeLinkMainDlg() |
| | | public EditAssetsThreelinkMainDlg() |
| | | { |
| | | InitializeComponent(); |
| | | this.IconOptions.Icon = Yw.WinFrmUI.GlobalParas.AppIcon; |
| | | } |
| | | |
| | | private Vmo.ThreeLinkMainVmo _ThreeLinkVmo = null; |
| | | private Vmo.AssetsThreelinkMainVmo _ThreeLinkVmo = null; |
| | | |
| | | public async void SetBindingData(Vmo.ThreeLinkMainVmo ThreeLinkVmo) |
| | | public async void SetBindingData(Vmo.AssetsThreelinkMainVmo ThreeLinkVmo) |
| | | { |
| | | _ThreeLinkVmo = ThreeLinkVmo; |
| | | var allCaliber = await new Yw.BLL.SysDictData().GetByTypeCode("1"); |
| | |
| | | { |
| | | TextEditMaterial.EditValue = _ThreeLinkVmo.MaterialName.ToString(); |
| | | } |
| | | this.textEditRunThroughCoefficient.Text = _ThreeLinkVmo.RunThroughCoefficient.ToString(); |
| | | this.textEditBranchThroughCoefficient.Text = _ThreeLinkVmo.BranchThroughCoefficient.ToString(); |
| | | this.TextEditName.Text = _ThreeLinkVmo.Name; |
| | | this.DescriptionTextEdit.Text = _ThreeLinkVmo.Description; |
| | | this.TextEditCoefficient.Text = _ThreeLinkVmo.Coefficient.ToString(); |
| | | this.TextEditKeyWorld.Text = _ThreeLinkVmo.KeyWord; |
| | | } |
| | | |
| | | public event Func<Vmo.ThreeLinkMainVmo, Task<bool>> ReloadDataEvent = null; |
| | | public event Func<Vmo.AssetsThreelinkMainVmo, Task<bool>> ReloadDataEvent = null; |
| | | |
| | | //数据验证 |
| | | private bool Valid() |
| | |
| | | { |
| | | _ThreeLinkVmo.Caliber = null; |
| | | } |
| | | if (double.TryParse(textEditRunThroughCoefficient.Text, out double runThrough)) |
| | | { |
| | | _ThreeLinkVmo.Coefficient = runThrough; |
| | | } |
| | | if (double.TryParse(textEditBranchThroughCoefficient.Text, out double branchThough)) |
| | | { |
| | | _ThreeLinkVmo.Coefficient = branchThough; |
| | | } |
| | | if (await this.ReloadDataEvent.Invoke(_ThreeLinkVmo)) |
| | | { |
| | | TipFormHelper.ShowSucceed("修改成功!"); |