Exemple #1
0
        public static DialogResult Show(Entity_Staff user)
        {
            dialogUser = new Dialog_UpdateUser();
            Placement_Application.Components.Resolution res = new Placement_Application.Components.Resolution();
            res.ResizeForm(dialogUser, 580, 1050);
            dialogUser.StartPosition = FormStartPosition.CenterParent;

            dialogUser.Opacity = Common.dialogOpacity;
            isNewUser          = true;
            currentUser        = user;

            dialogUser.label_studentId.Text = Labels.ADD_USER;
            dialogUser.but_update.Text      = Labels.ADD;

            dialogUser.textBox_userName.Focus();
            dialogUser.ShowDialog();

            return(result);
        }
Exemple #2
0
        public static DialogResult Show(Entity_Staff user, bool forOtherUser)
        {
            dialogUser = new Dialog_UpdateUser();
            Placement_Application.Components.Resolution res = new Placement_Application.Components.Resolution();
            res.ResizeForm(dialogUser, Common.dialog_height, Common.dialog_width);

            dialogUser.Opacity = Common.dialogOpacity;
            currentUser        = user;
            isNewUser          = false;
            isAdminRequest     = forOtherUser;

            dialogUser.textBox_userName.Text = currentUser.staffName;
            dialogUser.textBox_email.Text    = currentUser.email;
            dialogUser.textBox_contact.Text  = currentUser.phone;

            dialogUser.textBox_userName.Focus();
            dialogUser.ShowDialog();

            return(result);
        }