| | |
| | | using DevExpress.XtraEditors.Controls; |
| | | using DevExpress.XtraEditors.Repository; |
| | | |
| | | namespace HStation.WinFrmUI.Assets |
| | | { |
| | |
| | | this.dxErrorProvider1.SetError(this.textEditName, "必填项"); |
| | | return false; |
| | | } |
| | | if (string.IsNullOrEmpty(textEditReserveCount.Text.Trim())) |
| | | if (string.IsNullOrEmpty(textEditUseCount.Text.Trim())) |
| | | { |
| | | this.dxErrorProvider1.SetError(this.textEditReserveCount, "必填项"); |
| | | this.dxErrorProvider1.SetError(this.textEditUseCount, "必填项"); |
| | | return false; |
| | | } |
| | | |
| | | if (_allBindingList != null) |
| | | { |
| | | int.TryParse(textEditUseCount.Text, out int UseCount); |
| | | if (UseCount < _allBindingList.Count) |
| | | { |
| | | TipFormHelper.ShowError("使用数量大于泵数量"); |
| | | return false; |
| | | } |
| | | } |
| | | return true; |
| | | } |
| | | |
| | |
| | | _EquipmentVmo.Description = DescriptionTextEdit.Text.Trim(); |
| | | _EquipmentVmo.Name = textEditName.Text.Trim(); |
| | | _EquipmentVmo.NO = textEditNo.Text.Trim(); |
| | | if (int.TryParse(this.textEditReserveCount.Text, out int equipmentCount)) |
| | | if (int.TryParse(this.textEditUseCount.Text, out int equipmentCount)) |
| | | { |
| | | _EquipmentVmo.PumpCount = equipmentCount; |
| | | _EquipmentVmo.PumpUseCount = equipmentCount; |
| | | } |
| | | if (long.TryParse(textEditCatalog.EditValue?.ToString() ?? "", out long catalogID)) |
| | | { |