private void comboBoxClassifier_SelectedIndexChanged(object sender, EventArgs e) { try { lookUpValue.Properties.DataSource = null; lookUpValue.Properties.Columns.Clear(); _items.Clear(); switch (comboBoxClassifier.SelectedIndex) { case (int)StaffTypeOrCategory.Classifiers.StaffType: GetStaffTypes(); FillInValueDropdown(); break; case (int)StaffTypeOrCategory.Classifiers.StaffCategory: GetStaffCategories(); FillInValueDropdown(); break; } } catch (Exception ex) { XlateMessageBox.Error(ex.Message); } }
private void CloseDialog() { if (drugSearchControl.SelectedIndex < 0) { XlateMessageBox.Error(Strings.PleaseEnterADrug); return; } // Get DRG_ID of the selected drug int drugId = GetDrugIdForSelectedDrug(); // Import the drug to Drug table if doesn't exist if (drugId <= 0) { drugId = ImportSelectedDrug(); } if (drugId <= 0) { Value = 0; DialogResult = DialogResult.Cancel; Close(); } else { Value = drugId; ValidateChildren(); DialogResult = DialogResult.OK; Close(); } }
/// <summary> /// Overriden to prevent user from opening the selction window if no pre-defined values are selected /// </summary> /// <returns></returns> protected override OpResultEnum OpenSelectionWindowImpl() { if(!HasPreselectedValues) { XlateMessageBox.Information(Strings.IQEnumVarActivity_PreselectedRequired); return OpResultEnum.Cancelled; } return base.OpenSelectionWindowImpl(); }
private void richTextBoxDetail_LinkClicked(object sender, LinkClickedEventArgs e) { try { System.Diagnostics.Process.Start(e.LinkText); } catch (Exception ex) { XlateMessageBox.Error(ex.Message); } }
/// <summary> /// Activity heavy lifting. /// </summary> /// <param name="context"></param> protected override void DoWork(CodeActivityContext context) { //Get Argument Values string message = Message.Get(context) ?? String.Empty; string caption = Caption.Get(context) ?? String.Empty; XlateMessageBoxDefaultButtons defaultButtons = DefaultButtons.Get(context); //Heavy Lifting YesNoCancelDialogResult result = XlateMessageBox.YesNoCancel(message, caption, defaultButtons); DialogResult.Set(context, result); }
private void ShowDialog(object obj) { CodeActivityContext context = (CodeActivityContext)obj; //Get Argument Values string message = Message.Get(context) ?? String.Empty; string caption = Caption.Get(context) ?? String.Empty; XlateMessageBoxDefaultButtons defaultButtons = DefaultButtons.Get(context); bool result = XlateMessageBox.YesNoMessage(message, caption, defaultButtons); DialogResult.Set(context, result); }
/// <summary> /// Activity heavy lifting. /// </summary> /// <param name="context"></param> protected override void DoWork(CodeActivityContext context) { //Get Argument Values string message = Message.Get(context) ?? String.Empty; string caption = Caption.Get(context) ?? String.Empty; //Heavy Lifting YesNoDialogResult result = String.IsNullOrWhiteSpace(caption) ? XlateMessageBox.Warning(message) : XlateMessageBox.Warning(message, caption); DialogResult.Set(context, result); }
/// <summary> /// Activity heavy lifting. /// </summary> /// <param name="context"></param> protected override void DoWork(CodeActivityContext context) { //Get Argument Values string message = Message.Get(context) ?? String.Empty; string caption = Caption.Get(context) ?? String.Empty; //Heavy Lifting if (String.IsNullOrWhiteSpace(caption)) { XlateMessageBox.Error(message); } else { XlateMessageBox.Error(message, caption); } }
/// <summary> /// Opens the IQEnumEditor /// </summary> /// <param name="currentValue"></param> /// <param name="target"></param> /// <returns></returns> protected override IQOpResult<IQEnum> OpenEditor(IQEnum currentValue, IQVarElementTarget target) { if (target == IQVarElementTarget.Selected) { XlateMessageBox.Information(Strings.IQEnumVarActivity_PreselectedRequired); return new IQOpResult<IQEnum> {Result = OpResultEnum.Cancelled}; } if (currentValue == null) currentValue = new IQEnum {Key = GetNextKey(), Value = String.Empty}; var editor = new IQEnumEditor {Value = currentValue}; return editor.ShowDialog() == DialogResult.OK ? new IQOpResult<IQEnum> {Result = OpResultEnum.Completed, Value = editor.Value} : new IQOpResult<IQEnum> {Result = OpResultEnum.Cancelled}; }
/// <summary> /// Activity heavy lifting. /// </summary> /// <param name="context"></param> protected override void DoWork(CodeActivityContext context) { //Get Argument Values AccessAction action = (Action.Expression != null) ? Action.Get(context) : AccessAction.AccessNotAllowed; string caption = Caption.Get(context) ?? String.Empty; //Heavy Lifting if (String.IsNullOrWhiteSpace(caption)) { XlateMessageBox.AccessDenied(action); } else { XlateMessageBox.AccessDenied(action, caption); } }
private void ShowError() { string message = string.Empty; if (MinValue.HasValue && MaxValue.HasValue) { message = string.Format(Strings.RangeErrorBetween, MinValue, MaxValue); } else if (MinValue.HasValue) { message = string.Format(Strings.RangeErrorBelowMin, MinValue); } else if (MaxValue.HasValue) { message = string.Format(Strings.RangeErrorAboveMax, MaxValue); } if (!string.IsNullOrWhiteSpace(message)) { XlateMessageBox.Information(message); } }