示例#1
0
 private void btn_login_Click(object sender, EventArgs e)
 {
     if (tb_password.TextLength * tb_password.TextLength >= 36)
     {
         if (BLL_User.login(tb_userName, tb_password))
         {
             BLL_User.showFormRole(BLL_User.getRole(tb_userName.Text), this, new PresentationTier.BanHang.FormMainBanHang(),
                                   new PresentationTier.CongNo.FormMainCongNo(), new PresentationTier.Kho.FormMainKho(),
                                   new PresentationTier.NhanSu.frmMainNhanSu(), new PresentationTier.PhongKeHoach.FormMainPhongKeHoach(),
                                   new PresentationTier.TichHop.FormAdmin());
         }
         else
         {
             MessageBox.Show("Thất Bại");
         }
     }
     else
     {
         MessageBox.Show("Sai Định Dạng");
     }
 }
 private void tw_ds_AfterSelect(object sender, TreeViewEventArgs e)
 {
     lb_userName.Text = tw_ds.SelectedNode.Text;
     BLL_User.LoadRole(BLL_User.getRole(lb_userName.Text.Trim().ToLower()), rb_no, rb_banHang,
                       rb_congNo, rb_kho, rb_nhanSu, rb_pkh, rb_admin);
 }