Example #1
0
        public UpdateAccount(AdminDataGrid account)
        {
            UserName   = account.StaffUserName;
            FirstName  = account.StaffFirstName;
            LastName   = account.StaffLastName;
            StaffTitle = account.StaffTitle;
            StaffID    = account.StaffID;

            helperUserName = account.StaffUserName;
            InitializeComponent();
            text_UserName.Focus();
        }
Example #2
0
        private void EditAccount(object sender, MouseButtonEventArgs e)
        {
            try
            {
                DataGrid dg = sender as DataGrid;

                AdminDataGrid p  = (AdminDataGrid)dg.SelectedItems[0];                // OR:  Patient p = (Patient)dg.SelectedItem;
                UpdateAccount up = new UpdateAccount(p);

                up.UserRole.SelectedItem = p.StaffDBRole;
                up.ShowDialog();
            }
            catch (Exception error)
            {
            }

            Refresh_AdminGrid(sender, e);
        }