| | |
| | | |
| | | namespace HStation.WinFrmUI.Assets |
| | | { |
| | | public partial class AddThreeLinkMainDlg : DevExpress.XtraEditors.XtraForm |
| | | public partial class AddAssetsThreelinkMainDlg : DevExpress.XtraEditors.XtraForm |
| | | { |
| | | public AddThreeLinkMainDlg() |
| | | public AddAssetsThreelinkMainDlg() |
| | | { |
| | | InitializeComponent(); |
| | | this.IconOptions.Icon = Yw.WinFrmUI.GlobalParas.AppIcon; |
| | | } |
| | | |
| | | private Vmo.ThreeLinkMainVmo _ThreeLinkVmo = null; |
| | | private Vmo.AssetsThreelinkMainVmo _ThreeLinkVmo = null; |
| | | |
| | | public async void SetBindingData(long SeriesID) |
| | | { |
| | | _ThreeLinkVmo = new Vmo.ThreeLinkMainVmo(); |
| | | _ThreeLinkVmo = new Vmo.AssetsThreelinkMainVmo(); |
| | | _ThreeLinkVmo.SeriesID = SeriesID; |
| | | var allCaliber = await new Yw.BLL.SysDictData().GetByTypeCode("1"); |
| | | if (allCaliber != null) |
| | |
| | | TextEditMaterial.SelectedIndex = 0; |
| | | } |
| | | |
| | | public event Func<Vmo.ThreeLinkMainVmo, Task<bool>> ReloadDataEvent = null; |
| | | public event Func<Vmo.AssetsThreelinkMainVmo, Task<bool>> ReloadDataEvent = null; |
| | | |
| | | //数据验证 |
| | | private bool Valid() |
| | |
| | | _ThreeLinkVmo.Description = DescriptionTextEdit.Text.Trim(); |
| | | _ThreeLinkVmo.Name = TextEditName.Text.Trim(); |
| | | _ThreeLinkVmo.KeyWord = TextEditKeyWorld.Text.Trim(); |
| | | _ThreeLinkVmo.MaterialName = TextEditMaterial.Text.Trim(); |
| | | if (TextEditMaterial.Text != "默认") |
| | | { |
| | | _ThreeLinkVmo.MaterialName = TextEditMaterial.Text.Trim(); |
| | | } |
| | | if (double.TryParse(TextEditCaliber.Text, out double caliber)) |
| | | { |
| | | _ThreeLinkVmo.Caliber = caliber; |
| | | } |
| | | if (double.TryParse(TextEditCoefficient.Text, out double Coefficient)) |
| | | if (double.TryParse(TextEditCoefficient.Text, out double coefficient)) |
| | | { |
| | | _ThreeLinkVmo.Coefficient = Coefficient; |
| | | _ThreeLinkVmo.Coefficient = coefficient; |
| | | } |
| | | 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)) |
| | | { |