public async override Task <bool> ActionAsync(string action) { bool result = base.Action(action); if (result && action == ACTION_IMPORT) { if (SiteManager.Instance.CheckAPIAccess()) { using (ImportByGCCodesForm dlg = new ImportByGCCodesForm()) { if (dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK) { _gcList = dlg.GCCodes; await PerformImport(); if (!string.IsNullOrEmpty(_errormessage)) { System.Windows.Forms.MessageBox.Show(_errormessage, Utils.LanguageSupport.Instance.GetTranslation(Utils.LanguageSupport.Instance.GetTranslation(STR_ERROR)), System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Error); } } } } } return(result); }
public override bool Action(string action) { bool result = base.Action(action); if (result && action == ACTION_IMPORT) { if (SiteManager.Instance.CheckAPIAccess()) { using (ImportByGCCodesForm dlg = new ImportByGCCodesForm()) { if (dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK) { _gcList = dlg.GCCodes; PerformImport(); if (!string.IsNullOrEmpty(_errormessage)) { System.Windows.Forms.MessageBox.Show(_errormessage, Utils.LanguageSupport.Instance.GetTranslation(Utils.LanguageSupport.Instance.GetTranslation(STR_ERROR)), System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Error); } } } } } return result; }