Esempio n. 1
0
 private void btnSave_Click(object sender, EventArgs e)
 {
     if (!Document.UpdateDocument())
     {
         string msg = "Изменения не внесены.\n" + Document.Error.Message;
         ErrorMsgBox.Show("Ошибка.", msg, Document.Error.ToString());
         this.Close();
     }
     else
     {
         Document.EndEdit();
         MessageBox.Show("Изменения внесены.", "Информация", MessageBoxButtons.OK);
         Document.BeginEdit();
     }
 }
Esempio n. 2
0
 private void btnSave_Click(object sender, EventArgs e)
 {
     try
     {
         if (!Document.UpdateDocument())
         {
             string msg = Document.Error.Message;
             ErrorMsgBox.Show("Ошбика.", msg, Document.Error.ToString());
         }
         ;
         Document.EndEdit();
         MessageBox.Show("Изменения сохранены", "Информация", MessageBoxButtons.OK, MessageBoxIcon.Information);
         Document.BeginEdit();
         //this.Close();
     }
     catch (Exception exception)
     {
         ErrorMsgBox.Show("Ошбика.", "Изменения не были внесены. " + exception.Message, exception.ToString());
         this.Close();
     }
 }
Esempio n. 3
0
        public static void Show(string caption, string message, string info)
        {
            ErrorMsgBox box = new ErrorMsgBox(caption, message, info);

            box.ShowDialog();
        }