예제 #1
0
        public async void GetLoaiBia()
        {
            var listLoaiBia = await ExecSQL.ExecQueryDataAsync <LoaiBia>("SELECT id, loaibia FROM dbo.tbl_loaibia");

            cbo_loaibia.Properties.DataSource    = listLoaiBia;
            cbo_loaibia.Properties.DisplayMember = "loaibia";
            cbo_loaibia.Properties.ValueMember   = "id";
        }
예제 #2
0
        public async void GetQuaTang()
        {
            var lstQuaTang = await ExecSQL.ExecQueryDataAsync <QuaTang>("SELECT maquatang, quatang FROM dbo.tbl_quatang ORDER BY quatang");

            cboQuaTang.Properties.DataSource    = lstQuaTang;
            cboQuaTang.Properties.DisplayMember = "quatang";
            cboQuaTang.Properties.ValueMember   = "maquatang";
        }
예제 #3
0
        public async void GetNhomDonVi()
        {
            var dt = await ExecSQL.ExecQueryDataAsync <NhomDonVi>("SELECT id, nhomdonvi FROM dbo.tbl_nhomdonvi");

            cbo_nhomdonvi.Properties.DataSource    = dt;
            cbo_nhomdonvi.Properties.DisplayMember = "nhomdonvi";
            cbo_nhomdonvi.Properties.ValueMember   = "id";
        }
예제 #4
0
        public async void GetTuaTruyen2()
        {
            var listTuaTruyen = await ExecSQL.ExecQueryDataAsync <TuaTruyen>("SELECT matua, tuatruyen FROM dbo.tbl_tuatruyen ORDER BY tuatruyen");

            cbo_tua2.DataSource    = listTuaTruyen;
            cbo_tua2.DisplayMember = "tuatruyen";
            cbo_tua2.ValueMember   = "matua";
        }
예제 #5
0
        public async void GetNhaXuatBan()
        {
            var dt = await ExecSQL.ExecQueryDataAsync <NXB>("SELECT manxb, nhaxuatban FROM dbo.tbl_nhaxuatban ORDER BY nhaxuatban");

            cbo_nhaxuatban.Properties.DataSource    = dt;
            cbo_nhaxuatban.Properties.DisplayMember = "nhaxuatban";
            cbo_nhaxuatban.Properties.ValueMember   = "manxb";
        }
예제 #6
0
        public async void GetQuocGia()
        {
            var dt = await ExecSQL.ExecQueryDataAsync <QuocGia>("SELECT id, quocgia FROM dbo.tbl_quocgia ORDER BY quocgia");

            cbo_quocgia.Properties.DataSource    = dt;
            cbo_quocgia.Properties.DisplayMember = "quocgia";
            cbo_quocgia.Properties.ValueMember   = "id";
        }
예제 #7
0
        public async void GetDonViTinh()
        {
            var listDonViTinh = await ExecSQL.ExecQueryDataAsync <DonViTinh>("SELECT id, donvitinh FROM dbo.tbl_donvitinh");

            cbo_donvitinh.DataSource    = listDonViTinh;
            cbo_donvitinh.DisplayMember = "donvitinh";
            cbo_donvitinh.ValueMember   = "id";
        }
예제 #8
0
        public async void GetLoaiTruyen()
        {
            var dt = await ExecSQL.ExecQueryDataAsync <LoaiTruyen>("SELECT maloai, loaitruyen FROM dbo.tbl_loaitruyen ORDER BY loaitruyen");

            cbo_loaitruyen.Properties.DataSource    = dt;
            cbo_loaitruyen.Properties.DisplayMember = "loaitruyen";
            cbo_loaitruyen.Properties.ValueMember   = "maloai";
        }
예제 #9
0
        public async void GetKho()
        {
            var listKho = await ExecSQL.ExecQueryDataAsync <Kho>("SELECT makho, tenkho FROM dbo.tbl_kho ORDER BY tenkho");

            cbo_kho.Properties.DataSource    = listKho;
            cbo_kho.Properties.DisplayMember = "tenkho";
            cbo_kho.Properties.ValueMember   = "makho";
        }
예제 #10
0
        public async void GetTacGia()
        {
            var listTacGia = await ExecSQL.ExecQueryDataAsync <TacGia>("SELECT matacgia, tacgia FROM dbo.tbl_tacgia ORDER BY tacgia");

            cbo_tacgia2.DataSource    = listTacGia;
            cbo_tacgia2.DisplayMember = "tacgia";
            cbo_tacgia2.ValueMember   = "matacgia";
        }
예제 #11
0
        public async void GetTacGia()
        {
            var listTacGia = await ExecSQL.ExecQueryDataAsync <TacGia>("SELECT matacgia, tacgia FROM dbo.tbl_tacgia ORDER BY tacgia");

            cbo_tacgia.Properties.DataSource    = listTacGia;
            cbo_tacgia.Properties.DisplayMember = "tacgia";
            cbo_tacgia.Properties.ValueMember   = "matacgia";
            cbo_tacgia.EditValue = ComicPro.StrMaTacGia;
        }
예제 #12
0
        public async void GetLoaiPhieu()
        {
            var listLoaiPhieu = await ExecSQL.ExecQueryDataAsync <LoaiPhieu>("SELECT id, loaiphieu FROM dbo.tbl_loaiphieunhapxuat");

            cbo_loaiphieu.Properties.DataSource    = listLoaiPhieu;
            cbo_loaiphieu.Properties.DisplayMember = "loaiphieu";
            cbo_loaiphieu.Properties.ValueMember   = "id";
            cbo_loaiphieu.EditValue = 1;
        }
예제 #13
0
        public async void GetTuaTruyen()
        {
            var listTuaTruyen = await ExecSQL.ExecQueryDataAsync <TuaTruyen>("SELECT matua, tuatruyen FROM dbo.tbl_tuatruyen WHERE theodoi=1 ORDER BY tuatruyen");

            cbo_tuatruyen.Properties.DataSource    = listTuaTruyen;
            cbo_tuatruyen.Properties.DisplayMember = "tuatruyen";
            cbo_tuatruyen.Properties.ValueMember   = "matua";
            cbo_tuatruyen.EditValue = ComicPro.StrMaTua;
        }
예제 #14
0
        public async void GetKho()
        {
            var x       = gridView1.FocusedRowHandle;
            var y       = gridView1.TopRowIndex;
            var listKho = await ExecSQL.ExecQueryDataAsync <Kho>("SELECT * FROM dbo.tbl_kho");

            dgv_kho.BeginInvoke(new Action(() =>
            {
                dgv_kho.DataSource = listKho;
            }));
            gridView1.FocusedRowHandle = x;
            gridView1.TopRowIndex      = y;
        }
예제 #15
0
        public async void GetLoaiBia()
        {
            var x  = gridView1.FocusedRowHandle;
            var y  = gridView1.TopRowIndex;
            var dt = await ExecSQL.ExecQueryDataAsync <LoaiBia>("SELECT * FROM dbo.tbl_loaibia");

            dgv_loaibia.BeginInvoke(new Action(() =>
            {
                dgv_loaibia.DataSource     = dt;
                gridView1.FocusedRowHandle = x;
                gridView1.TopRowIndex      = y;
            }));
        }
예제 #16
0
        public async void GetNguoiDung()
        {
            var x  = gridView1.FocusedRowHandle;
            var y  = gridView1.TopRowIndex;
            var dt = await ExecSQL.ExecQueryDataAsync <User>("SELECT * FROM dbo.tbl_user where tendangnhap<>'admin'");

            dgv_nguoidung.BeginInvoke(new Action(() =>
            {
                dgv_nguoidung.DataSource   = dt;
                gridView1.FocusedRowHandle = x;
                gridView1.TopRowIndex      = y;
            }));
        }
예제 #17
0
        public async void GetDonViTinh()
        {
            var x  = gridView1.FocusedRowHandle;
            var y  = gridView1.TopRowIndex;
            var dt = await ExecSQL.ExecQueryDataAsync <DonViTinh>("SELECT * FROM dbo.tbl_donvitinh");

            dgv_donvitinh.BeginInvoke(new Action(() =>
            {
                dgv_donvitinh.DataSource = dt;
            }));
            gridView1.FocusedRowHandle = x;
            gridView1.TopRowIndex      = y;
        }
예제 #18
0
        public async void GetNxb()
        {
            var x  = gridView1.FocusedRowHandle;
            var y  = gridView1.TopRowIndex;
            var dt = await ExecSQL.ExecQueryDataAsync <NXB>("SELECT * FROM dbo.tbl_nhaxuatban");

            dgv_nhaxuatban.BeginInvoke(new Action(() =>
            {
                dgv_nhaxuatban.DataSource  = dt;
                gridView1.FocusedRowHandle = x;
                gridView1.TopRowIndex      = y;
            }));
        }
예제 #19
0
        public async void GetTacGia()
        {
            var x          = gridView1.FocusedRowHandle;
            var y          = gridView1.TopRowIndex;
            var listTacGia = await ExecSQL.ExecQueryDataAsync <TacGia>("SELECT * FROM dbo.tbl_tacgia ORDER BY matacgia");

            dgv_tacgia.BeginInvoke(new Action(() =>
            {
                dgv_tacgia.DataSource = listTacGia;
            }));
            gridView1.FocusedRowHandle = x;
            gridView1.TopRowIndex      = y;
        }