Exemplo n.º 1
0
 //Login
 private void button1_Click(object sender, EventArgs e)
 {
     if (UsersDatabase.CheckUser(textBox1.Text, PasswordLabel.Text))
     {
         Program.CurrentUser = UsersDatabase.GetTargetUser(textBox1.Text);
         Program.ControlerWindow.Show();
         Program.ControlerWindow.Update();
         Hide();
     }
     else
     {
         MessageBox.Show("Account Dont Exist");
     }
 }
Exemplo n.º 2
0
        private void button1_Click(object sender, EventArgs e)
        {
            TrUser = UsersDatabase.GetTargetUser(SearcherUserTextField.Text);

            permLogin.Text    = TrUser.Login;
            permPassword.Text = TrUser.Password;

            permAdmin.Checked         = TrUser.UserPermision.Admin;
            permCreateUsers.Checked   = TrUser.UserPermision.CreateUsers;
            permReplenishment.Checked = TrUser.UserPermision.Replenishment;
            permCreateOrders.Checked  = TrUser.UserPermision.CreateOrders;
            permChangeOrders.Checked  = TrUser.UserPermision.ChangeOrders;
            permPriority.Checked      = TrUser.UserPermision.Priority;
        }