예제 #1
0
        private void btnAdauga_Click(object sender, EventArgs e)
        {
            HalaForm frm = null;

            try
            {
                frm = new HalaForm("Adauga hala", 0, "", false);
                frm.ShowDialog();
                frm.FormClosed += new Form.FormClosedEventHandler(HalaForm_FormClosing);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
예제 #2
0
 private void btnModifica_Click(object sender, EventArgs e)
 {
     HalaForm frm = null;
     try
     {
         if (halaCurenta == null)
         {
             btnAdauga_Click(sender, e);
         }
         else
         {
             frm = new HalaForm("Editeaza hala " + halaCurenta.Denumire, halaCurenta.Id, halaCurenta.Denumire, halaCurenta.Anulat);
             frm.ShowDialog();
             frm.FormClosed += new Form.FormClosedEventHandler(HalaForm_FormClosing);
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }