lixiaojun
2024-10-31 abf1e3b3334ab47c38aa92405a11a6ec92b7847a
WinFrmUI/HStation.WinFrmUI.Assets.Core/06-threeLink/02-main/AddThreeLinkMainDlg.cs
@@ -2,19 +2,19 @@
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)
@@ -38,7 +38,7 @@
            TextEditMaterial.SelectedIndex = 0;
        }
        public event Func<Vmo.ThreeLinkMainVmo, Task<bool>> ReloadDataEvent = null;
        public event Func<Vmo.AssetsThreelinkMainVmo, Task<bool>> ReloadDataEvent = null;
        //数据验证
        private bool Valid()
@@ -66,14 +66,25 @@
            _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))
            {