private void fDonHangMangVe_Load(object sender, EventArgs e) { dsChiNhanh = XuLyDuLieu.docBang("select * from ChiNhanh"); cbChiNhanh.DataSource = dsChiNhanh; cbChiNhanh.DisplayMember = "TenChiNhanh"; cbChiNhanh.ValueMember = "MaChiNhanh"; dsDonHang = XuLyDuLieu.docBang("select * from DonHang"); dtgvDonHang.DataSource = dsDonHang; dsLichSu = XuLyDuLieu.docBang("Select * from LichSuMua"); dtgvLichSu.DataSource = dsLichSu; }
private void cbChiNhanh_TextChanged(object sender, EventArgs e) { dsBan = XuLyDuLieu.docBang("select * from Ban where MaChiNhanh like '" + cbChiNhanh.SelectedValue + "'"); lvDanhSachBan.Items.Clear(); for (int i = 0; i < dsBan.Rows.Count; i++) { lvDanhSachBan.Items.Add(dsBan.Rows[i]["TenBan"].ToString()); lvDanhSachBan.Items[i].SubItems.Add(dsBan.Rows[i]["TrangThai"].ToString()); lvDanhSachBan.Items[i].SubItems.Add(dsBan.Rows[i]["MaChiNhanh"].ToString()); } }
private void bophanquanli_Load(object sender, EventArgs e) { dsChiNhanh = XuLyDuLieu.docBang("select * from ChiNhanh"); dsChiNhanhView = new DataView(dsChiNhanh); dgvChiNhanh.DataSource = dsChiNhanhView; dsBan = XuLyDuLieu.docBang("select * from Ban"); dgvBan.DataSource = dsBan; dsMonAn = XuLyDuLieu.docBang("select * from MonAn"); dgvMonAn.DataSource = dsMonAn; dsDanhMuc = XuLyDuLieu.docBang("select *from DanhMuc"); dgvDanhMuc.DataSource = dsDanhMuc; }
private void tongdai_Load(object sender, EventArgs e) { dsMonAn = XuLyDuLieu.docBang("select * from MonAn"); dsMonAnView = new DataView(dsMonAn); dgvMonAn.DataSource = dsMonAnView; dsChiNhanh = XuLyDuLieu.docBang("select * from ChiNhanh"); dsChiNhanhView = new DataView(dsChiNhanh); dgvChiNhanh.DataSource = dsChiNhanhView; comboBox1.DataSource = dsChiNhanh; comboBox1.DisplayMember = "TenChiNhanh"; comboBox1.ValueMember = "MaChiNhanh"; dsdonhang = XuLyDuLieu.docBang("select * from DonHang"); dgvDonHang.DataSource = dsdonhang; dskhach = XuLyDuLieu.docBang("Select * from Khach"); dgvKhach.DataSource = dskhach; dslichsu = XuLyDuLieu.docBang("select * from LichSuMua"); dslichsuview = new DataView(dslichsu); dgvLichSu.DataSource = dslichsuview; }
private void fDonHangChiNhanh_Load(object sender, EventArgs e) { dsChiNhanh = XuLyDuLieu.docBang("select * from ChiNhanh"); cbChiNhanh.DataSource = dsChiNhanh; cbChiNhanh.DisplayMember = "TenChiNhanh"; cbChiNhanh.ValueMember = "MaChiNhanh"; dsDonHang = XuLyDuLieu.docBang("select * from DonHang"); dtgvDonHang.DataSource = dsDonHang; dsLichSu = XuLyDuLieu.docBang("Select * from LichSuMua"); dtgvLichSu.DataSource = dsLichSu; dsBan = XuLyDuLieu.docBang("select * from Ban where MaChiNhanh like '" + cbChiNhanh.SelectedValue + "'"); lvDanhSachBan.Items.Clear(); for (int i = 0; i < dsBan.Rows.Count; i++) { lvDanhSachBan.Items.Add(dsBan.Rows[i]["TenBan"].ToString()); lvDanhSachBan.Items[i].SubItems.Add(dsBan.Rows[i]["TrangThai"].ToString()); lvDanhSachBan.Items[i].SubItems.Add(dsBan.Rows[i]["MaChiNhanh"].ToString()); lvDanhSachBan.Items[i].SubItems.Add("0"); } }
private void cbChiNhanh_SelectedIndexChanged(object sender, EventArgs e) { if (cbChiNhanh.Text == "ChiNhanhToan") { dsMonAn = XuLyDuLieu.docBang("select * from MonAn where MaChiNhanh like '%1%' "); dsMonAnView = new DataView(dsMonAn); dtgvDanhSachMonAn.DataSource = dsMonAnView; } else if (cbChiNhanh.Text == "ChiNhanhSang") { dsMonAn = XuLyDuLieu.docBang("select * from MonAn where MaChiNhanh like '%2%'"); dsMonAnView = new DataView(dsMonAn); dtgvDanhSachMonAn.DataSource = dsMonAnView; } else { dsMonAn = XuLyDuLieu.docBang("select * from MonAn where MaChiNhanh like '%3%'"); dsMonAnView = new DataView(dsMonAn); dtgvDanhSachMonAn.DataSource = dsMonAnView; } }
private void fThongTinCaNhan_Load(object sender, EventArgs e) { dskhach = XuLyDuLieu.docBang("Select * from Khach"); dtgvKhachHang.DataSource = dskhach; }
private void fDoanhThuTong_Load(object sender, EventArgs e) { dsChiPhi = XuLyDuLieu.docBang("select * from ChiPhiPhatSinh"); dtgvChiPhi.DataSource = dsChiPhi; }
private void button1_Click(object sender, EventArgs e) { dsDonHang = XuLyDuLieu.docBang("select * from DonHang where Loai like '%3%' "); dtgvNhanDH.DataSource = dsDonHang; }
private void fChiPhiPhatSinhNgay_Load(object sender, EventArgs e) { dsChiPhi = XuLyDuLieu.docBang("select * from ChiPhiPhatSinh"); }