private void LoadData(int ma_donhang) { //int tong = 0; txtMaDH.Text = ma_donhang.ToString(); dgvChiTietDonHang.DataSource = ctdn.ChiTietDonHang_GetByID(ma_donhang); string[] columns = { "ma_sp", "ten_sp", "so_luong", "gia", "thanh_tien" }; Ultilities.DataGridViewFormat(dgvChiTietDonHang, columns); }
private void LoadData() { dgvNhanvien.DataSource = nhanvien.NhanVien_GetAll(); string[] columns = { "ma_nv", "ten_nv" }; Ultilities.DataGridViewFormat(dgvNhanvien, columns); //dgvNhanvien.Columns[0].Visible = true; //dgvNhanvien.Columns[1].Visible = true; //dgvNhanvien.Columns[2].Visible = false; //dgvNhanvien.Columns[3].Visible = false; //dgvNhanvien.Columns[4].Visible = false; //dgvNhanvien.Columns[5].Visible = false; //dgvNhanvien.Columns[6].Visible = false; }
private void btSearch_Click(object sender, EventArgs e) { if (txtTim.Text != "") { dgvKhachhang.DataSource = khachhang.KhachHang_GetByName(txtTim.Text); string[] columns = { "ma_kh", "hoten" }; Ultilities.DataGridViewFormat(dgvKhachhang, columns); } else { MessageBox.Show("Nhập tên khách hàng cần tìm!"); txtTim.Focus(); } }
private void btSearch_Click(object sender, EventArgs e) { if (txtTim.Text != "") { dgvNhanvien.DataSource = nhanvien.NhanVien_GetByName(txtTim.Text); string[] columns = { "ma_nv", "ten_nv" }; Ultilities.DataGridViewFormat(dgvNhanvien, columns); } else { MessageBox.Show("Nhập tên nhân viên cần tìm!"); txtTim.Focus(); } }
private void LoadData() { dgvKhachhang.DataSource = khachhang.KhachHang_GetAll(); string[] columns = { "ma_kh", "hoten" }; Ultilities.DataGridViewFormat(dgvKhachhang, columns); }
private void LoadData() { dgvNhanvien.DataSource = nhanvien.NhanVien_GetAll(); string[] columns = { "ma_nv", "ten_nv" }; Ultilities.DataGridViewFormat(dgvNhanvien, columns); }
private void btSearch_Click(object sender, EventArgs e) { dgvSanPham.DataSource = sanpham.SanPham_Search(txtSearch.Text); string[] columns = { "ma_sp", "ten_sp", "mo_ta", "gia", "phan_loai" }; Ultilities.DataGridViewFormat(dgvSanPham, columns); }
private void LoadData() { dgvSanPham.DataSource = sanpham.SanPham_GetAll(); string[] columns = { "ma_sp", "ten_sp", "mo_ta", "gia", "phan_loai" }; Ultilities.DataGridViewFormat(dgvSanPham, columns); }
private void LoadData() { dgvDonhang.DataSource = donhang.DonHang_GetAll(); string[] columns = { "ngay_dat", "tinh_trang", "ma_kh", "ma_nv" }; Ultilities.DataGridViewFormat(dgvDonhang, columns); }
private void btSearch_Click(object sender, EventArgs e) { dgvDonhang.DataSource = donhang.DonHang_GetByDate(dtpFrom.Value, dtpTo.Value); string[] columns = { "ngay_dat", "tinh_trang", "ma_kh", "ma_nv" }; Ultilities.DataGridViewFormat(dgvDonhang, columns); }