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(); } }
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; //Heavy Lifting if (String.IsNullOrWhiteSpace(caption)) { XlateMessageBox.Error(message); } else { XlateMessageBox.Error(message, caption); } }