コード例 #1
0
        private void ThongbaoToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Thongbaobaohanh frm = new Thongbaobaohanh();

            frm.ShowDialog();
        }
コード例 #2
0
        private void Manhinhchinh_Load(object sender, EventArgs e)
        {
            // TODO: This line of code loads data into the 'qLCHDienThoaiDDDataSet10.HOADON' table. You can move, or remove it, as needed.
            //this.hOADONTableAdapter.Fill(this.qLCHDienThoaiDDDataSet10.HOADON);
            DangNhap fr = new DangNhap();

            fr.ShowDialog();
            tootaikhoan.Text = fr.TAIKHOAN;
            MAQUYEN          = fr.MAQUYEN;
            if (MAQUYEN == "1")    //ban hang
            {
                hệThốngToolStripMenuItem.Visible    = true;
                banhangToolStripMenuItem.Visible    = true;
                khoHàngToolStripMenuItem.Visible    = false;
                côngNợToolStripMenuItem.Visible     = false;
                quỹToolStripMenuItem.Visible        = false;
                nhânSựToolStripMenuItem.Visible     = false;
                quảnTrịToolStripMenuItem.Visible    = false;
                toolStripButtonTruycapnhanh.Visible = true;
                mathangToolStripMenuItem.Visible    = true;
                trợGiúpToolStripMenuItem.Visible    = true;
                tsbkhuyenmai.Visible             = true;
                kythuatToolStripMenuItem.Visible = false;
                tsbbaocao.Visible    = true;
                tsbthongke.Visible   = false;
                tsbmathang.Visible   = true;
                tsbKhachHang.Visible = true;
                TSS3.Visible         = false;
                TSS5.Visible         = false;
            }
            if (MAQUYEN == "2")    //ky thuat
            {
                Thongbaobaohanh();
                hệThốngToolStripMenuItem.Visible    = true;
                banhangToolStripMenuItem.Visible    = false;
                khoHàngToolStripMenuItem.Visible    = false;
                côngNợToolStripMenuItem.Visible     = false;
                quỹToolStripMenuItem.Visible        = false;
                nhânSựToolStripMenuItem.Visible     = false;
                quảnTrịToolStripMenuItem.Visible    = false;
                toolStripButtonTruycapnhanh.Visible = true;
                mathangToolStripMenuItem.Visible    = false;
                trợGiúpToolStripMenuItem.Visible    = true;
                tsbkhuyenmai.Visible             = false;
                kythuatToolStripMenuItem.Visible = true;
                tsbbaocao.Visible    = true;
                tsbthongke.Visible   = false;
                tsbmathang.Visible   = false;
                tsbKhachHang.Visible = false;
                TSS1.Visible         = false;
                TSS3.Visible         = false;
                TSS5.Visible         = false;
                if (demthongbaobaohanh != 0)
                {
                    Thongbaobaohanh frm = new Thongbaobaohanh();
                    frm.ShowDialog();
                }
            }
            if (MAQUYEN == "3")    //tra gop
            {
                Thongbaotragop();
                hệThốngToolStripMenuItem.Visible    = true;
                banhangToolStripMenuItem.Visible    = false;
                khoHàngToolStripMenuItem.Visible    = false;
                côngNợToolStripMenuItem.Visible     = true;
                quỹToolStripMenuItem.Visible        = false;
                nhânSựToolStripMenuItem.Visible     = false;
                quảnTrịToolStripMenuItem.Visible    = false;
                toolStripButtonTruycapnhanh.Visible = true;
                mathangToolStripMenuItem.Visible    = true;
                trợGiúpToolStripMenuItem.Visible    = true;
                tsbkhuyenmai.Visible             = false;
                kythuatToolStripMenuItem.Visible = false;
                tsbbaocao.Visible    = true;
                tsbthongke.Visible   = false;
                tsbmathang.Visible   = true;
                tsbKhachHang.Visible = true;
                TSS1.Visible         = false;
                TSS3.Visible         = false;
                TSS5.Visible         = false;
                if (demthongbaotragop != 0)
                {
                    Thongbaotragop frm = new Thongbaotragop();
                    frm.ShowDialog();
                }
            }
            if (MAQUYEN == "4")    //kho
            {
                hệThốngToolStripMenuItem.Visible    = true;
                banhangToolStripMenuItem.Visible    = false;
                khoHàngToolStripMenuItem.Visible    = true;
                côngNợToolStripMenuItem.Visible     = false;
                quỹToolStripMenuItem.Visible        = false;
                nhânSựToolStripMenuItem.Visible     = false;
                quảnTrịToolStripMenuItem.Visible    = false;
                toolStripButtonTruycapnhanh.Visible = true;
                mathangToolStripMenuItem.Visible    = true;
                trợGiúpToolStripMenuItem.Visible    = true;
                tsbkhuyenmai.Visible             = false;
                kythuatToolStripMenuItem.Visible = false;
                tsbbaocao.Visible    = true;
                tsbthongke.Visible   = false;
                tsbmathang.Visible   = true;
                tsbKhachHang.Visible = false;
                TSS2.Visible         = false;
                TSS1.Visible         = false;
                TSS3.Visible         = false;
                TSS5.Visible         = false;
            }
            if (MAQUYEN == "5")    //admin
            {
                hệThốngToolStripMenuItem.Visible    = true;
                banhangToolStripMenuItem.Visible    = false;
                khoHàngToolStripMenuItem.Visible    = false;
                côngNợToolStripMenuItem.Visible     = false;
                quỹToolStripMenuItem.Visible        = false;
                nhânSựToolStripMenuItem.Visible     = true;
                quảnTrịToolStripMenuItem.Visible    = true;
                toolStripButtonTruycapnhanh.Visible = true;
                trợGiúpToolStripMenuItem.Visible    = true;
                tsbkhuyenmai.Visible             = false;
                kythuatToolStripMenuItem.Visible = false;
                tsbbaocao.Visible    = true;
                tsbthongke.Visible   = false;
                tsbmathang.Visible   = false;
                tsbKhachHang.Visible = false;
                TSS2.Visible         = false;
                TSS1.Visible         = false;
                TSS3.Visible         = false;
                TSS5.Visible         = false;
            }
            if (MAQUYEN == "6")    //admin
            {
                hệThốngToolStripMenuItem.Visible    = true;
                banhangToolStripMenuItem.Visible    = false;
                khoHàngToolStripMenuItem.Visible    = false;
                côngNợToolStripMenuItem.Visible     = false;
                quỹToolStripMenuItem.Visible        = true;
                nhânSựToolStripMenuItem.Visible     = false;
                quảnTrịToolStripMenuItem.Visible    = false;
                toolStripButtonTruycapnhanh.Visible = true;
                trợGiúpToolStripMenuItem.Visible    = true;
                tsbkhuyenmai.Visible             = false;
                kythuatToolStripMenuItem.Visible = false;
                tsbbaocao.Visible    = true;
                tsbthongke.Visible   = true;
                tsbmathang.Visible   = false;
                tsbKhachHang.Visible = false;
                TSS2.Visible         = false;
                TSS1.Visible         = false;
                TSS3.Visible         = false;
                TSS5.Visible         = false;
            }
            Thu();
            Chi();
            Bienlai();
            Tragop();
        }