Beispiel #1
0
 static void Main()
 {
     Application.EnableVisualStyles();
     Application.SetCompatibleTextRenderingDefault(false);
     if (ConnectionString != string.Empty)
     {
         using (worker cworker = new worker())
         {
             if (cworker.ID > 0)
             {
                 using (KursForm kf = new KursForm(cworker))
                 {
                     if (kf.ShowDialog() == DialogResult.OK)
                     {
                         using (MainForm mf = new MainForm(cworker))
                         {
                             mf.ShowDialog();
                         }
                     }
                 }
             }
             else
             {
                 MessageBox.Show("Неверно определен пользователь!", string.Empty, MessageBoxButtons.OK, MessageBoxIcon.Error);
             }
         }
     }
 }
Beispiel #2
0
 private void chngKursB_Click(object sender, EventArgs e)
 {
     using (KursForm kf = new KursForm(cworker))
     {
         kf.ShowDialog();
     }
 }