Exemplo n.º 1
0
 public UserDetailsWindow(SystemUserController userCtrl)
 {
     InitializeComponent();
     this.userCtrl        = userCtrl;
     lblUsername.Content  = userCtrl.Useraccess.ToString();
     lblUserID.Content    = Convert.ToInt32(userCtrl.UserID.ToString());
     lblEmpNumber.Content = userCtrl.EmployeeNumber.ToString();
     lblUserType.Content  = userCtrl.EmployeeType.ToString();
 }
 public UserDetailsEditForm(SystemUserController userCtrl)
 {
     InitializeComponent();
     this.userCtrl        = userCtrl;
     txtUserID.Text       = userCtrl.UserID.ToString();
     txtUsername.Text     = userCtrl.Useraccess;
     txtPassword.Password = userCtrl.Userpassword;
     txtEmpNumber.Text    = userCtrl.EmployeeNumber;
     txtUserType.Text     = userCtrl.EmployeeType;
 }
Exemplo n.º 3
0
        private void btnView(object sender, MouseButtonEventArgs e)
        {
            DataRowView rowview = dataGridView1.SelectedItem as DataRowView;

            userCtrl.UserID = Convert.ToInt32(rowview.Row["UserID"]);

            userCtrl = userCtrl.UserUpdateDetails(userCtrl);
            UserDetailsWindow edt = new UserDetailsWindow(userCtrl);

            edt.Show();
        }
Exemplo n.º 4
0
        private void btnEdit(object sender, MouseButtonEventArgs e)
        {
            DataRowView rowview = dataGridView1.SelectedItem as DataRowView;

            userCtrl.UserID = Convert.ToInt32(rowview.Row["UserID"]);

            userCtrl = userCtrl.UserUpdateDetails(userCtrl);
            if (userCtrl.UserID > 0)
            {  //
                UserDetailsEditForm edt = new UserDetailsEditForm(userCtrl);
                edt.Show();
                LoadData();
            }
            else //message box wrong user or password
            {
                MessageBox.Show("Error");
            }
        }
Exemplo n.º 5
0
 private void ConfigureOperationControllers(ServiceEnvironment serviceEnvironment)
 {
     this.systemConnectionController = new SystemConnectionController(serviceEnvironment);
     this.systemUserController       = new SystemUserController(serviceEnvironment);
     this.systemNoteController       = new SystemNoteController(serviceEnvironment);
 }