private void frm_dangky_FormClosed(object sender, FormClosedEventArgs e) { if (Common.TenNguoiTruyCap.Equals("Quản trị viên")) { frm_dangnhap dangnhap = new frm_dangnhap(); dangnhap.ShowDialog(); } }
private void frm_main_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.F1) { mnu_hethong.RaiseClick(); } if (e.KeyCode == Keys.F2) { mnu_nhanvien.RaiseClick(); } if (e.KeyCode == Keys.F3) { mnu_hanghoa.RaiseClick(); } if (e.KeyCode == Keys.F4) { mnu_nhacungcap.RaiseClick(); } if (e.KeyCode == Keys.F5) { mnu_hoadon.RaiseClick(); } if (e.KeyCode == Keys.F6) { mnu_trogiup.RaiseClick(); } if (e.KeyData == (Keys.Control | Keys.X)) { frm_dangnhap dangnhap = new frm_dangnhap(); dangnhap.ShowDialog(); } if (e.KeyCode == Keys.Enter) { btn_themvaohoadon.PerformClick(); } if (e.KeyData == (Keys.Control | Keys.M)) { btn_hoadonmoi.PerformClick(); } if (e.KeyData == (Keys.Control | Keys.L)) { btn_luu.PerformClick(); } if (e.KeyData == (Keys.Control | Keys.I)) { btn_inhd.PerformClick(); } }
public frm_main() { InitializeComponent(); cnn = SQL.cnn; dangnhap = new frm_dangnhap(); player = new SoundPlayer(@"audio\beep.wav"); doc = new DirectoryInfo(Common.DocumentPath); tongtien = 0; dong = 0; // //-----------------------TAO BANG VA ADD VAO DATAGRIDVIEW // dt = new DataTable(); dt.Columns.Add("Tên hàng hóa"); dt.Columns.Add("Số lượng"); dt.Columns.Add("Giá bán"); dgv_bang.DataSource = dt; }
private void ptb_dangxuat_Click(object sender, EventArgs e) { frm_dangnhap dangnhap = new frm_dangnhap(); dangnhap.ShowDialog(); }
private void frm_dangky_FormClosed(object sender, FormClosedEventArgs e) { if(Common.TenNguoiTruyCap.Equals("Quản trị viên")) { frm_dangnhap dangnhap = new frm_dangnhap(); dangnhap.ShowDialog(); } }