Example #1
0
 private void EditOrg_Click(object sender, EventArgs e)
 {
     try
     {
         Cursor.Current = Cursors.WaitCursor;
         using (HealthOrgForm hoForm = new HealthOrgForm(true, int.Parse(cbArea.SelectedValue.ToString()), int.Parse(cbShortNameOrg.SelectedValue.ToString())))
         {
             hoForm.ShowDialog();
         }
         LoadHealthOrgList();
         Cursor.Current = Cursors.Default;
     }
     catch (Exception ex)
     {
         Cursor.Current = Cursors.Default;
         logger.Error(ex, $"\r\n#---------#\r\n{ex.StackTrace}\r\n##---------##\r\n{ex.Message}\r\n###---------###\r\n{ex.Source}");
         MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Example #2
0
 private void AddOrg_Click(object sender, EventArgs e)
 {
     try
     {
         Cursor.Current = Cursors.WaitCursor;
         using (HealthOrgForm hoForm = new HealthOrgForm(false, 0, 0))
         {
             hoForm.ShowDialog();
         }
         LoadHealthOrgList();
         Cursor.Current = Cursors.Default;
     }
     catch (Exception ex)
     {
         Cursor.Current = Cursors.Default;
         logger.Error(ex, $"\r\n#---------#\r\n{ex.StackTrace}\r\n##---------##\r\n{ex.Message}\r\n###---------###\r\n{ex.Source}");
         MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }