Пример #1
0
 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();
     }
 }
Пример #2
0
        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();
            }
        }
Пример #3
0
        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;
        }
Пример #4
0
        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;
        }
Пример #5
0
        private void ptb_dangxuat_Click(object sender, EventArgs e)
        {
            frm_dangnhap dangnhap = new frm_dangnhap();

            dangnhap.ShowDialog();
        }
Пример #6
0
 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();
     }
 }
Пример #7
0
 private void ptb_dangxuat_Click(object sender, EventArgs e)
 {
     frm_dangnhap dangnhap = new frm_dangnhap();
     dangnhap.ShowDialog();
 }
Пример #8
0
        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();
            }
        }