예제 #1
0
        private void frmMain_Load(object sender, EventArgs e)
        {
            UCThuoc thuoc = new UCThuoc();
            this._panelMain.Controls.Clear();
            thuoc.Dock = DockStyle.Fill;
            this._panelMain.Controls.Add(thuoc);

            if (quyen == "Nhân viên")
            {
                //vToolStripMenuItem.Enabled = false;
                //cToolStripMenuItem.Enabled = false;
            }
            string sql = "SELECT NHANVIEN.HOTEN, ChUCVU.MOTA FROM NHANVIEN,CHUCVU WHERE CHUCVU.MACHUCVU = NHANVIEN.MACHUCVU AND MANHANVIEN = '" + maNV + "' ";
            DataTable TenNhanVien = ConnectToServer.Instance.GetTable(sql);
            if (TenNhanVien.Rows.Count > 0)
            {
                _toolStripStatusLabel.Text = TenNhanVien.Rows[0][0].ToString();
                toolStripStatusLabel3.Text = TenNhanVien.Rows[0][1].ToString();
            }
        }
예제 #2
0
 private void thuốcToolStripMenuItem_Click(object sender, EventArgs e)
 {
     UCThuoc frm = new UCThuoc();
     frm.Dock = DockStyle.Fill;
     _panelMain.Controls.Clear();
     _panelMain.Controls.Add(frm);
 }