Exemple #1
0
 private void Validate_Click(object sender, RoutedEventArgs e)
 {
     AdminData.Datarowrequet(grdRequest);
     Sql_Connection.UPdateDataRequest(AdminData.A_ID);
     Sql_Connection.FillDataGridRequest(grdRequest);
     Powershell.Take_Serveur_Name(AdminData.A_Name);
     Powershell.Add_User_IntoGroups(AdminData.U_Serveur_Name, AdminData.A_Group, AdminData.A_Name);
 }
 public ManagerWindow_NewRequest()
 {
     InitializeComponent();
     Sql_Connection.BindComboBox(Group_request);
     Sql_Connection.BindComboBoxuser(Change_request);
     Sql_Connection.BindComboBoxuser(Upgrade_user);
     Sql_Connection.BindComboBoxuser(Delete_user);
 }
 private void Button_Validate(object sender, RoutedEventArgs e)
 {
     AdminData.DatarowUser(NewUser);
     Sql_Connection.UPdateDataNewUser(AdminData.U_Name);
     Powershell.Take_Serveur_Name(AdminData.U_Name);
     Powershell.Take_password();
     Powershell.Create_User(AdminData.U_Serveur_Name, AdminData.U_Surname, AdminData.U_Name, AdminData.U_Name, AdminData.U_password_decrypted);
     Sql_Connection.FillDataGridUser(NewUser);
 }
Exemple #4
0
 public void Login_Click(object sender, RoutedEventArgs e)
 {
     Sql_Connection.Login(Loginbox, Passwordbox);
     if (Sql_Connection.message == "1")
     {
         if (UserInfo.CustomerRole == "User")
         {
             UserWindows mainWindow = new UserWindows();
             mainWindow.Top  = this.Top;
             mainWindow.Left = this.Left;
             mainWindow.Show();
             this.Close();
         }
         else if (UserInfo.CustomerRole == "Admin")
         {
             AdminWindow mainWindow = new AdminWindow();
             mainWindow.Top  = this.Top;
             mainWindow.Left = this.Left;
             mainWindow.Show();
             this.Close();
         }
         else if (UserInfo.CustomerRole == "Manager")
         {
             ManagerWindow mainWindow = new ManagerWindow();
             mainWindow.Top  = this.Top;
             mainWindow.Left = this.Left;
             mainWindow.Show();
             this.Close();
         }
         else
         {
             MessageBox.Show("No rigth, access prohibited", "Info");
         }
     }
     else
     {
         MessageBox.Show(Sql_Connection.message, "Info");
     }
 }
Exemple #5
0
        private void New_User(object sender, RoutedEventArgs e)
        {
            ManagerData.M_Domain   = UserInfo.DomainID;
            ManagerData.M_Mail     = Mail_texybox.Text;
            ManagerData.M_Surname  = Surname_texybox.Text;
            ManagerData.M_password = Password_texybox.Text;

            ManagerData.M_Name      = Name_texybox.Text;
            ManagerData.M_password2 = Password2_texybox.Text;
            string role = "User";

            if (ManagerData.M_password == ManagerData.M_password2)
            {
                string encryptedString = Cryption.EncryptString(Cryption.key, ManagerData.M_password);
                string plain2          = encryptedString;

                Sql_Connection.NewUser(ManagerData.M_Mail, ManagerData.M_Name, plain2, ManagerData.M_Surname, ManagerData.M_Domain, role);
            }
            else
            {
                MessageBox.Show("Password are not the Same ", "Info");
            }
        }
 private void Change_user_request(object sender, SelectionChangedEventArgs e)
 {
     Sql_Connection.ChangeUserRequest(Change_request);
 }
Exemple #7
0
 private void Reject_Click(object sender, RoutedEventArgs e)
 {
     AdminData.Datarowrequet(grdRequest);
     Sql_Connection.DeleteDataNewRequest(AdminData.A_ID);
     Sql_Connection.FillDataGridRequest(grdRequest);
 }
Exemple #8
0
 private void Validate_Click(object sender, RoutedEventArgs e)
 {
     ManagerData.Datarowrequet(UserAproval);
     Sql_Connection.UPdateDataRequestManager(ManagerData.M_ID);
     Sql_Connection.FillDataGridRequestManager(UserAproval);
 }
 private void Upgrade_User(object sender, RoutedEventArgs e)
 {
     Sql_Connection.UpgradeUser(Upgrade_user);
 }
 private void Button_Reject(object sender, RoutedEventArgs e)
 {
     AdminData.DatarowUser(NewUser);
     Sql_Connection.DeleteDataNewUser(AdminData.U_Name);
     Sql_Connection.FillDataGridUser(NewUser);
 }
 public AdminWindowUser()
 {
     InitializeComponent();
     Sql_Connection.FillDataGridUser(NewUser);
 }
Exemple #12
0
 private void Group_combo_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     Sql_Connection.Selctionmodification(group_combo, group_Description);
 }
Exemple #13
0
 private void Do_Request(object sender, RoutedEventArgs e)
 {
     Sql_Connection.ASK_request(group_Justi);
 }
Exemple #14
0
 public UserWindows()
 {
     InitializeComponent();
     Sql_Connection.BindComboBox(group_combo);
 }
Exemple #15
0
 private void Reject_Click(object sender, RoutedEventArgs e)
 {
     ManagerData.Datarowrequet(UserAproval);
     Sql_Connection.DeleteDataNewRequest(ManagerData.M_ID);
     Sql_Connection.FillDataGridRequestManager(UserAproval);
 }
 private void Group_add_description(object sender, SelectionChangedEventArgs e)
 {
     Sql_Connection.Selctionmodification(Group_request, group_Description);
 }
 private void Do_Request(object sender, RoutedEventArgs e)
 {
     Sql_Connection.ASK_requestManager();
 }
Exemple #18
0
        public AdminWindow()
        {
            InitializeComponent();

            Sql_Connection.FillDataGridRequest(grdRequest);
        }
 private void Deleted_User(object sender, RoutedEventArgs e)
 {
     Sql_Connection.DeletedUser(Delete_user);
     Powershell.Take_Serveur_Name(ManagerData.M_Name);
     Powershell.Delete_User(AdminData.U_Serveur_Name, ManagerData.M_Name);
 }
Exemple #20
0
        public ManagerWindow()
        {
            InitializeComponent();

            Sql_Connection.FillDataGridRequestManager(UserAproval);
        }