Пример #1
0
        private void adduser_Click(object sender, RoutedEventArgs e)
        {
            userbox ub = new userbox(this.com, this.use, "add");

            ub.Show();
            this.Close();
        }
 private void adduserbtn_Click(object sender, RoutedEventArgs e)
 {
     if (f.CheckForInternetConnection())
     {
         string  selected    = ((ComboBoxItem)companyEditComboBox.SelectedItem).Tag.ToString();
         company selectedone = f.set_Company(int.Parse(selected));
         userbox userb       = new userbox(selectedone);
         userb.Show();
         this.Close();
     }
     else
     {
         MessageBox.Show("אין חיבור לאינטרנט");
     }
 }
Пример #3
0
 private void okbtn_Click(object sender, RoutedEventArgs e)
 {
     loader.Content = "טוען..";
     if (mooo > 0)
     {
         if (f.CheckForInternetConnection())
         {
             string selected = ((ComboBoxItem)generalcb.SelectedItem).Tag.ToString();
             if (editforuser == 0)
             {
                 if (f.removequat(selected) == 0)
                 {
                     edituser ed = new edituser(0);
                     ed.Show();
                     this.Close();
                 }
                 else
                 {
                     edituser ed = new edituser(f.set_Company(f.removequat(selected)));
                     ed.Show();
                     this.Close();
                 }
             }
             if (editforuser == 1 || editforuser == 2)
             {
                 userbox ed = new userbox(f.retrunuserbyid(f.removequat(selected)));
                 ed.Show();
                 this.Close();
             }
         }
         else
         {
             MessageBox.Show("אין אינטרנט");
             loader.Content = "";
         }
     }
     else
     {
         MessageBox.Show("אין רשומות");
         loader.Content = "";
     }
 }
Пример #4
0
 private void okbtn_Click(object sender, RoutedEventArgs e)
 {
     if (f.CheckForInternetConnection())
     {
         if (generalcb.SelectedItem == null)
         {
             MessageBox.Show("אנא בחר מתוך הרשימה");
         }
         else
         {
             string  selected = ((ComboBoxItem)generalcb.SelectedItem).Tag.ToString();
             user    u        = f.retrunuserbyid(f.removequat(selected));
             userbox ub       = new userbox(this.com, u);
             ub.Show();
             this.Close();
         }
     }
     else
     {
         MessageBox.Show("אין חיבור לרשת");
     }
 }