private void frmNhanVien_Load(object sender, EventArgs e)
        {
            DataTable dtDS = new System.Data.DataTable();

            dtDS = nvCtr.GetData();
            dtgvDS.DataSource = dtDS;
            binhding();
            DisEnl(false);
        }
Beispiel #2
0
        private void frmTimkiemnhanvien_Load(object sender, EventArgs e)
        {
            DataTable dtDS = new System.Data.DataTable();

            dtDS = nvCtr.GetData();
            dtgvDS.DataSource = dtDS;
        }
Beispiel #3
0
        private void Form1_Load(object sender, EventArgs e)
        {
            if (lbShow.Text == "Nhân viên")
            {
                tabControl.TabPages.Remove(tabNhanVien);
                mnHome.DropDownItems.Remove(submenuAddAccount);
                mnHome.DropDownItems.Remove(submnDelAccount);
            }
            frmChooseReport frm = new frmChooseReport();

            frm.TopLevel        = false;
            frm.Visible         = true;
            frm.FormBorderStyle = FormBorderStyle.None;
            frm.Dock            = DockStyle.Fill;
            tabControl.TabPages[5].Controls.Add(frm);

            //Load NV
            DataTable dtDSNV = new DataTable();

            dtDSNV = nvCtr.GetData();
            dtgvDSNV.DataSource = dtDSNV; //hiển thị dl trong dtgv
            DTBDNhanVien();               //lấy dự liệu từ dtgv hiển thị lên cac textbox
            DisEnlNV(false);

            //LoadHH
            DataTable dtDSHH = new DataTable();

            dtDSHH            = hhCtr.GetData();
            dtgvHH.DataSource = dtDSHH;
            DTBDHH();
            DisEnlHH(false);

            //Load KH\
            DataTable dtDSKH = new System.Data.DataTable();

            dtDSKH            = khCtr.GetData();
            dtgvKH.DataSource = dtDSKH;
            DTBDKH();
            DisEnlKH(false);

            //Load NCC
            DataTable dtDSNCC = new DataTable();

            dtDSNCC            = nccCtr.GetData();
            dtgvNCC.DataSource = dtDSNCC; //hiển thị dl trong dtgv
            DTBDNCC();                    //lấy dự liệu từ dtgv hiển thị lên cac textbox
            DisEnlNCC(false);

            //Load Hoa Don
            DisEnlHD(false);
            DataTable dt = new DataTable();

            dt = hdCtr.GetData();
            dtgvDSHD.DataSource = dt;
            DTBDHD();
            txtCreateDate.Enabled = false;
            //DataTable dt1 = new DataTable();
            //dt1 = ctCtr.GetData(txtMa.Text.Trim());
            //dtgvDSHH.DataSource = dt1;
        }
Beispiel #4
0
        private void FrmNhanVien_Load(object sender, EventArgs e)
        {
            DataTable dtNhanVien = new DataTable();

            dtNhanVien          = nvctr.GetData();
            dtgvDSNV.DataSource = dtNhanVien;
            bingding();
            Dis_En(false);
        }
        private bool kiemtra(string ma, string mk)
        {
            DataTable dt = new DataTable();

            dt = nvctr.GetData("Where MaNV = '" + ma + "' and MatKhau= " + mk);
            if (dt.Rows.Count > 0)
            {
                bientoancuc.bienxy = dt.Rows[0][0].ToString();
                bientoancuc.tennv  = dt.Rows[0][1].ToString();
                bientoancuc.maqh   = dt.Rows[0][7].ToString();
                return(true);
            }
            return(false);
        }