Example #1
0
 private void sbtnNew_Click(object sender, EventArgs e)
 {
     Program.eButton = Program.Button.New;
     Clear();
     oUserInfo = new Account.Common.Entities.User_Info();
     Enable(true);
     txt_User_ID.Focus();
 }
Example #2
0
        private void sbtnDetail_Click(object sender, EventArgs e)
        {
            oSelectedUser = Find_User(gridView1.GetFocusedRowCellValue(gcolUserID).ToString());
            if (oSelectedUser == null)
            {
                return;
            }
            frmUserProfile ofrm = new frmUserProfile();

            ofrm.ShowDialog();
            SetDataSource();
        }
Example #3
0
 private void sbtnEdit_Click(object sender, EventArgs e)
 {
     oUserInfo = frmUserProfileList.oSelectedUser;
     if (oUserInfo.User_ID == Program.CurrentUser.User_ID)
     {
         MessageBox.Show("Bạn không được chỉnh sửa thông tin này", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Error);
         return;
     }
     Program.eButton = Program.Button.Edit;
     Enable(true);
     txt_User_ID.Focus();
     txt_Password.Enabled = false;
 }
Example #4
0
 private void Detail_UserProfile(Account.Common.Entities.User_Info oCurUserProfile)
 {
     txt_User_ID.Text  = oCurUserProfile.User_ID;
     txt_FullName.Text = oCurUserProfile.FullName;
     txt_Password.Text = oCurUserProfile.Password;
     oSelectedBranch   = Program.FindBranch(oCurUserProfile.Branch_ID);
     if (oSelectedBranch != null)
     {
         lookUEdit_BranchID.EditValue = oSelectedBranch.ID;
         txt_BranchName.Text          = oSelectedBranch.Name;
     }
     chk_IsAdmin.EditValue  = oCurUserProfile.IsAdministrator;
     dtLastLogin.EditValue  = oCurUserProfile.LastLogin;
     dtLastLogout.EditValue = oCurUserProfile.LastLogout;
 }
Example #5
0
 private void sbtnResetPass_Click(object sender, EventArgs e)
 {
     oSelectedUser = Find_User(gridView1.GetFocusedRowCellValue(gcolUserID).ToString());
     if (oSelectedUser == null)
     {
         return;
     }
     if (Program.CurrentUser.IsAdministrator == false)
     {
         MessageBox.Show("Bạn không được quyền sử dụng chức năng này", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Warning);
         return;
     }
     else
     {
         frmUserResetPassword ofrm = new frmUserResetPassword();
         ofrm.ShowDialog();
     }
 }