| | |
| | | namespace HStation.WinFrmUI |
| | | using DevExpress.Utils.Svg; |
| | | |
| | | namespace HStation.WinFrmUI |
| | | { |
| | | public partial class CreateXhsSchemeInfoPage : DevExpress.XtraEditors.XtraUserControl, Yw.WinFrmUI.IWizardPage<CreateXhsSchemeViewModel> |
| | | { |
| | |
| | | /// </summary> |
| | | public async void InitialPage(CreateXhsSchemeViewModel t) |
| | | { |
| | | |
| | | if (_isInitialize) |
| | | { |
| | | return; |
| | |
| | | t.Scheme = new XhsSchemeVmo(); |
| | | if (t.AllSchemeList != null && t.AllSchemeList.Count > 0) |
| | | { |
| | | t.Scheme.SortCode = t.AllSchemeList.Max(x => x.SortCode) + 1; |
| | | var sort_code= t.AllSchemeList.Max(x => x.SortCode) + 1; |
| | | t.Scheme.SortCode = sort_code; |
| | | this.txtName.EditValue = $"方案{sort_code}"; |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | _vm.Scheme.Name = this.txtName.Text.Trim(); |
| | | _vm.Scheme.NO = this.txtNO.Text.Trim(); |
| | | _vm.Scheme.SiteID = _vm.ProjectSite.ID; |
| | | _vm.Scheme.Flags = this.setFlagsEditCtrl1.SelectedFlagList; |
| | | _vm.Scheme.AllowCustom = this.ckAllowCustom.Checked; |
| | | _vm.Scheme.ChangeTypes = this.xhsSchemeChangeTypeCheckedListHorizCtrl1.GetCheckedList(); |
| | |
| | | /// 能否下一步 |
| | | /// </summary> |
| | | public bool CanNext() |
| | | { |
| | | { |
| | | if (!_isInitialize) |
| | | { |
| | | return false; |
| | | } |
| | | return Save(); |
| | | } |
| | | |
| | |
| | | /// </summary> |
| | | public bool CanComplete() |
| | | { |
| | | return Save(); |
| | | if (!_isInitialize) |
| | | { |
| | | return false; |
| | | } |
| | | if (!Save()) |
| | | return false; |
| | | var bol = Task.Run(async () => await CreateXhsSchemeHelper.Create(_vm)).Result; |
| | | return bol; |
| | | } |
| | | |
| | | |