Exemplo n.º 1
0
 private void Account_UI_Load(object sender, EventArgs e)
 {
     if (style == 0)
     {
         txtHoTen.Text    = Information.Nhanvien.Ten;
         txtDiaChi.Text   = Information.Nhanvien.Diachi;
         txtEmail.Text    = Information.Nguoidung.Mail;
         txtTenTK.Text    = Information.Nguoidung.ID;
         txtSdt.Text      = Information.Nhanvien.sdt;
         txtMatKhau.Text  = "********";
         EmployeeToBackup = getEmployee();
     }
     else
     {
         lblNull2.Visible = false;
         txtEmail.Visible = false;
         if (EmployeeToBackup != null)
         {
             target = _service.CheckUser(EmployeeToBackup.MaNV);
             if (target != null)
             {
                 txtTenTK.Text   = target.ID;
                 txtMatKhau.Text = target.Pass;
                 txtHoTen.Text   = target.Pass;
                 txtDiaChi.Text  = target.Mail;
             }
             else
             {
                 txtTenTK.Enabled = true;
             }
             txtSdt.Text = EmployeeToBackup.MaNV;
         }
         else
         {
             txtTenTK.Enabled = true;
         }
         lblHoTen.Text         = "Nhập lại mật khẩu: ";
         lblDiaChi.Text        = "Email:  ";
         lblNull.Text          = "Mã nhân viên: ";
         txtHoTen.PasswordChar = '*';
         txtMatKhau.Enabled    = true;
     }
 }