示例#1
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            //Application.Run(new frm_main());
            Application.Run(frm_dn = new frm_dangnhap());

            //Application.Run(new frm_thietbiphong());
        }
示例#2
0
        private void Form1_Load(object sender, EventArgs e)
        {
            frm_dangnhap _login = new frm_dangnhap();

            _login.Close();
            if (frm_dangnhap.quyen.ToString() == "2")
            {
                button2.Enabled = false;
                button3.Enabled = false;
            }
        }
示例#3
0
        private void frm_main_FormClosing(object sender, FormClosingEventArgs e)
        {
            frm_dangnhap frm = new frm_dangnhap();

            Visible = false;
            frm.ShowDialog();


            //e.Cancel = true;
            //Program.frm_dn.Show();
        }
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            frm_dangnhap form = new frm_dangnhap();

            form.ShowDialog();
            if (form.islogin)
            {
                Application.Run(new frm_hopdong());
            }
        }
示例#5
0
        private void Frm_MuonTraSach_Load(object sender, EventArgs e)
        {
            enable(false);
            DataTable sach    = dt.sqlLayDuLieu("PSP_ShowTenSach");
            DataTable chitiet = dt.sqlLayDuLieu("PSP_CTMuonSach_Select");

            dgvChiTietMuon.DataSource  = chitiet;
            dgvChitietMuon1.DataSource = chitiet;
            for (int i = 1; i <= sach.Rows.Count; i++)
            {
                cmbTenSach.Items.Add(sach.Rows[sach.Rows.Count - i]["TenSach"].ToString());
            }
            txtMaHS.Enabled = txtMaSach.Enabled = txtMaMuon.Enabled = dtpNgayTra.Enabled = dtpNgayMuon.Enabled = dtpNgayHenTra.Enabled = false;
            frm_dangnhap _login = new frm_dangnhap();

            if (frm_dangnhap.quyen.ToString() == "2")
            {
                btnMoi.Enabled     = btnTraSach.Enabled = false;
                btnChoMuon.Enabled = btnTraSach.Enabled = false;
            }
        }