Exemplo n.º 1
0
 /// <summary>
 /// Tries the execute the add manager command
 /// </summary>
 private void AddManagerExecute()
 {
     try
     {
         AddManager addManager = new AddManager();
         view.Close();
         addManager.Show();
     }
     catch (Exception ex)
     {
         Debug.WriteLine("Exception" + ex.Message.ToString());
     }
 }
Exemplo n.º 2
0
 private void addUserToolStripMenuItem_Click(object sender, EventArgs e)
 {
     MainPanel.Controls.Clear();
     if (addUser != null)
     {
         addUser.Close();
     }
     addUser = new AddUser();
     FormSetUp(addUser);
 }
        /// <summary>
        /// Executes the save command
        /// </summary>
        private void SaveExecute()
        {
            try
            {
                service.AddSector(Sector);
                service.AddUser(User, Sector);

                if (!bgWorker.IsBusy)
                {
                    // This method will start the execution asynchronously in the background
                    bgWorker.RunWorkerAsync();
                }

                isUpdateUser = true;
                addUser.Close();
            }
            catch (Exception ex)
            {
                Debug.WriteLine("Exception" + ex.Message.ToString());
            }
        }