| | |
| | | namespace HStation.WinFrmUI.Assets |
| | | { |
| | | public partial class AddValveSeriesDlg : DevExpress.XtraEditors.XtraForm |
| | | public partial class AddAssetsValveSeriesDlg : DevExpress.XtraEditors.XtraForm |
| | | { |
| | | public AddValveSeriesDlg() |
| | | public AddAssetsValveSeriesDlg() |
| | | { |
| | | InitializeComponent(); |
| | | this.IconOptions.Icon = Yw.WinFrmUI.GlobalParas.AppIcon; |
| | | } |
| | | |
| | | public event Func<Vmo.ValveSeriesVmo, Task<bool>> ReloadDataEvent = null; |
| | | public event Func<Vmo.AssetsValveSeriesVmo, Task<bool>> ReloadDataEvent = null; |
| | | |
| | | //初始化 |
| | | private void AddValveSeriesDlg_Load(object sender, EventArgs e) |
| | | private void AddAssetsValveSeriesDlg_Load(object sender, EventArgs e) |
| | | { |
| | | TextEditType.Properties.AddEnum(typeof(HStation.Assets.eValveSeriesType)); |
| | | TextEditType.Properties.AddEnum(typeof(HStation.Assets.eAssetsValveSeriesType)); |
| | | } |
| | | |
| | | //数据验证 |
| | |
| | | { |
| | | if (!Valid()) |
| | | return; |
| | | var model = new Vmo.ValveSeriesVmo(); |
| | | var model = new Vmo.AssetsValveSeriesVmo(); |
| | | model.Name = NameTextEdit.Text; |
| | | if (Enum.TryParse(Convert.ToString(TextEditType.EditValue), true, out HStation.Assets.eValveSeriesType valvetype)) |
| | | if (Enum.TryParse(Convert.ToString(TextEditType.EditValue), true, out HStation.Assets.eAssetsValveSeriesType valvetype)) |
| | | { |
| | | model.Type = valvetype; |
| | | } |