Beispiel #1
0
        private void đăngNhậpToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Login_Form Temp = new Login_Form();

            Temp.ShowDialog();
            if (Main_Form.isLogin == true)
            {
                if (QuanLyMode == true)
                {
                    this.thốngKêToolStripMenuItem.Enabled        = true;
                    this.quảnLýNhânViênToolStripMenuItem.Enabled = true;
                }
                this.hoạtĐộngToolStripMenuItem.Enabled = true;
                this.quảnLýToolStripMenuItem.Enabled   = true;
                this.đăngNhậpToolStripMenuItem.Enabled = false;
                this.đăngXuấtToolStripMenuItem.Enabled = true;
                Main_MonthCalendar.Show();
                News_RichTextBox.Show();
                Phong_GroupBox.Show();
                App_Label.Hide();
                NV_Label.Show();
                News_Label.Show();

                BS_layer.BLNhanVien bl = new BS_layer.BLNhanVien();
                DataTable           dt = new DataTable();
                DataSet             ds = new DataSet();
                ds = bl.LayDSNVMainForm(user);
                dt = ds.Tables[0];
                FontFamily f = new FontFamily("Times New Roman");
                NV_Label.Font = new Font(f, 12);
                NV_Label.Text = "Nhân Viên đang đăng nhập: " + dt.Rows[0].ItemArray[0] + "\nTên: " + dt.Rows[0].ItemArray[1] + "\nChức Vụ: " + dt.Rows[0].ItemArray[2];
            }
        }
Beispiel #2
0
 public Main_Form()
 {
     isLogin    = false;
     QuanLyMode = true;
     InitializeComponent();
     KhoiTaoMoi();
     Main_MonthCalendar.Hide();
     News_RichTextBox.Hide();
     Phong_GroupBox.Hide();
     News_Label.Hide();
     this.NV_Label.Hide();
     App_Label.Show();
 }