Пример #1
0
        private void btnSignin_Click(object sender, EventArgs e)
        {
            string chucvu = us.LogIn(txtUsername.Text, txtPassword.Text);

            if (chucvu == "Quản lý" || chucvu == "Quản lý kho")
            {
                this.Hide();
                fQuanLy ql = new fQuanLy();
                ql.Text = txtUsername.Text;
                ql.ShowDialog();
                this.Close();
            }
            else if (chucvu == "Nhân viên bán hàng" || chucvu == "Cố vấn dịch vụ" || chucvu == "Kế toán")
            {
                this.Hide();
                fNhanVien nv = new fNhanVien();
                nv.Text = txtUsername.Text;
                nv.ShowDialog();
                this.Close();
            }
            else
            {
                MessageBox.Show("Tài khoản hoặc mật khẩu không đúng");
            }
        }
Пример #2
0
        private void mtNhanVien_Click(object sender, EventArgs e)
        {
            fNhanVien nv = new fNhanVien();

            this.Hide();
            nv.ShowDialog();
            this.Show();
        }
Пример #3
0
        public static fNhanVien khoitao()
        {
            if (check == false)
            {
                check = true;
                NV    = new fNhanVien();
            }
            else
            {
                NV.Activate();
            }

            return(NV);
        }
Пример #4
0
        private void btnNhanVien_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            Form frm = KiemTraTonTai(typeof(fNhanVien));

            if (frm != null)
            {
                frm.Activate();
            }
            else
            {
                fNhanVien nhanVien = new fNhanVien();
                nhanVien.MdiParent = this;

                Action.Module     = "Nhân Viên";
                Action.ActionName = "Xem";
                Action.LuuThongTin();

                nhanVien.Show();
            }
        }