Example #1
0
 private void addempbtn_Click(object sender, RoutedEventArgs e)
 {
     Mouse.OverrideCursor = Cursors.Wait;
     General.EmployeeModule.AddNewEmployeeWindow addemp = new General.EmployeeModule.AddNewEmployeeWindow();
     addemp.Show();
     Mouse.OverrideCursor = null;
 }
Example #2
0
 private void addempbtn_Click(object sender, RoutedEventArgs e)
 {
     if (SystemClass.CheckConnection())
     {
         ImusCityHallEntities db  = new ImusCityHallEntities();
         AddNewEmployeeWindow add = new AddNewEmployeeWindow();
         add.ShowDialog();
         employeelistlb.ItemsSource       = LoadEmployees(searchtb.Text);
         employeelistlb.DisplayMemberPath = "FirstName";
         employeelistlb.SelectedValuePath = "EmployeeID";
         employeelistlb.SelectedIndex     = 0;
     }
     else
     {
         MessageBox.Show(SystemClass.DBConnectionErrorMessage);
     }
 }
        private void addempbtn_Click(object sender, RoutedEventArgs e)
        {
            Mouse.OverrideCursor = Cursors.Wait;
            AddNewEmployeeWindow addemp = new AddNewEmployeeWindow();

            if (CheckNumberOfUser())
            {
                Mouse.OverrideCursor = null;
                MessageBox.Show("Maximum number of users already reached. Please contact your vendor");
            }
            else

            {
                Mouse.OverrideCursor = null;
                addemp.ShowDialog();
            }
        }