private void btnDangNhap_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { this.Hide(); FormDangNhap f = new FormDangNhap(); f.ShowDialog(); }
private void btnQuayLai_Click(object sender, EventArgs e) { FormDangNhap dangNhap = new FormDangNhap(); this.Hide(); dangNhap.ShowDialog(); this.Close(); }
private void đăngNhậpToolStripMenuItem_Click(object sender, EventArgs e) { FormDangNhap DN = new FormDangNhap(); this.Hide(); DN.ShowDialog(); this.Show(); }
private void đăngNhậpToolStripMenuItem_Click(object sender, EventArgs e) { FormDangNhap fmdn = new FormDangNhap(); this.Hide(); fmdn.ShowDialog(); this.Close(); }
// set BarSubItem_QuanLyUser for Is Admin???? private void QLTVMain_Load(object sender, EventArgs e) { FormDangNhap formDangNhap = new FormDangNhap(); formDangNhap.ShowDialog(); if (user.admin == true) { this.barSubItem_QuanTriHeThong.Enabled = true; } else { this.barSubItem_QuanTriHeThong.Enabled = false; } }
public void dangnhap() { frmdn = new FormDangNhap(); frmdn.ShowDialog(); if (bnguoidung.laydulieu("where TaiKhoan=N'" + frmdn.txtTaiKhoan.Text + "' and MatKhau=N'" + frmdn.txtMatKhau.Text + "'").Rows.Count == 1) { if (bnguoidung.dangnhap("select LoaiNguoiDung from tblNguoiDung where TaiKhoan=N'" + frmdn.txtTaiKhoan.Text + "' and LoaiNguoiDung='Admin' ").Rows.Count == 1) { admin(); } else if (bnguoidung.dangnhap("select LoaiNguoiDung from tblNguoiDung where TaiKhoan=N'" + frmdn.txtTaiKhoan.Text + "' and LoaiNguoiDung='qldt' ").Rows.Count == 1) { qldt(); } else if (bnguoidung.dangnhap("select LoaiNguoiDung from tblNguoiDung where TaiKhoan=N'" + frmdn.txtTaiKhoan.Text + "' and LoaiNguoiDung='qlsv' ").Rows.Count == 1) { qlsv(); } } }
private void FormMain_Load(object sender, EventArgs e) { dangNhap.ShowDialog(); DB = new DBMSQuanTraSuaDataContext(DynamicConnection.connectstr); this.pnlMain.Controls.Clear(); }