private void ChiNhanh_Load(object sender, EventArgs e)
 {
     dsChiNhanh = XuLyDuLieu.docBang("Select * from ChiNhanh");
     for (int i = 0; i < dsChiNhanh.Rows.Count; i++)
     {
         thôngTinToolStripMenuItem.DropDownItems.Add(dsChiNhanh.Rows[i]["MaCN"].ToString());
     }
     dsDHMonAn             = XuLyDuLieu.docBang("Select * from MonAn");
     dgvDsMonAn.DataSource = dsDHMonAn;
 }
 private void LISTVIEW(string idChiNhanh)
 {
     dsBan = XuLyDuLieu.docBang("Select * from Ban where MaCN LIKE '" + idChiNhanh + "'");
     lvDsBan.Items.Clear();
     for (int i = 0; i < dsBan.Rows.Count; i++)
     {
         lvDsBan.Items.Add(dsBan.Rows[i]["MaBan"].ToString());
         //lvDsBan.Items[i].SubItems.Add(dsBan.Rows[i]["MaCN"].ToString());
         lvDsBan.Items[i].SubItems.Add(dsBan.Rows[i]["TinhTrang"].ToString());
         lvDsBan.Items[i].SubItems.Add(dsBan.Rows[i]["ThoiGian"].ToString());
     }
 }
Beispiel #3
0
        private void TongDai_Load(object sender, EventArgs e)
        {
            ThongTinMonAn         = XuLyDuLieu.docBang("Select MaMA,TenMA,TenLoaiMA,DonGia from MonAn,LoaiMonAn where MonAn.MaLoaiMA = LoaiMonAn.MaLoaiMA");
            ThongTinView          = new DataView(ThongTinMonAn);
            dgvDSMonAn.DataSource = ThongTinView;

            ThongTinHoaDon         = XuLyDuLieu.docBang("select * from Rong");
            dgvDSHoaDon.DataSource = ThongTinHoaDon;

            LichSu               = XuLyDuLieu.docBang("Select TenCN,TenKH,DiaChi,SDT,ThoiGian,TongTien from LichSuMua");
            LichSuView           = new DataView(LichSu);
            dgvLichSu.DataSource = LichSuView;

            ThongTinChiNhanh       = XuLyDuLieu.docBang("Select TenCN,SDT,DiaChi  from ChiNhanh");
            dgvChiNhanh.DataSource = ThongTinChiNhanh;
        }
Beispiel #4
0
        private void Admin_Load(object sender, EventArgs e)
        {
            //Doc du lieu danh sach khach hang
            dsKhachHang     = XuLyDuLieu.docBang("Select *From KhachHang");
            dsKhachHangView = new DataView(dsKhachHang);
            dgvdanhsachkhachhang.DataSource = dsKhachHangView;

            //Doc du lieu danh sach chi nhanh
            dsChiNhanh             = XuLyDuLieu.docBang("Select *From ChiNhanh");
            dsChiNhanhView         = new DataView(dsChiNhanh);
            dgvchinhanh.DataSource = dsChiNhanhView;

            //Doc du lieu danh sach mon an

            dsMonAn             = XuLyDuLieu.docBang("Select *From MonAn");
            dsMonAnView         = new DataView(dsMonAn);
            dgvmonan.DataSource = dsMonAnView;
        }