public void NhapHang_GUI_Load(object sender, EventArgs e) { tbl = nk_BUS.Display("SELECT SANPHAM.MASP,TENSP,SLNHAP,DONVI,NHAPKHO.GIANHAP,NGAYNHAP,HOTEN " + "FROM SANPHAM,NHAPKHO,NHANVIEN " + "WHERE NHAPKHO.NGNHAP = MANV AND SANPHAM.MASP = NHAPKHO.MASP AND NGAYNHAP ='" + DateTime.Now + "'"); DataGrid.DataSource = tbl; DataGrid.AllowUserToAddRows = false; tblSP = sp_BUS.Display("SELECT MASP, TENSP, GIANHAP FROM SANPHAM"); txtID.DataSource = tblSP; txtID.DisplayMember = "MASP"; txtID.ValueMember = "MASP"; txtTen.DataSource = tblSP; txtTen.DisplayMember = "TENSP"; txtTen.ValueMember = "TENSP"; txtGiaNhap.DataSource = tblSP; txtGiaNhap.DisplayMember = "GIANHAP"; txtGiaNhap.ValueMember = "GIANHAP"; txtDay1.Value = txtDay2.Value = txtNgaynhap.Value = DateTime.Now; }
public void QLDichVu_GUI_Load(object sender, EventArgs e) { tblSP = sp_BUS.Display("SELECT * FROM SANPHAM WHERE LOAI != N'Phụ tùng' ORDER BY LOAI "); DataGridSanPham.DataSource = tblSP; DataGridSanPham.AllowUserToAddRows = false; txtLoai.DataSource = tblSP; txtLoai.DisplayMember = "LOAI"; txtLoai.ValueMember = "LOAI"; txtTimLoai.DataSource = tblSP; txtTimLoai.DisplayMember = "LOAI"; txtTimLoai.ValueMember = "LOAI"; }
public void Kho_GUI_Load(object sender, EventArgs e) { if (nv_BUS.getIDPQ(_Ten) != 1) { bunifuFlatButton2.Enabled = false; btnXoa.Enabled = false; btnSua.Enabled = false; } else { bunifuFlatButton2.Enabled = true; btnXoa.Enabled = true; btnSua.Enabled = true; } tblSP = sp_BUS.Display("SELECT * FROM SANPHAM WHERE LOAI = N'Phụ tùng'"); DataGridSanPham.DataSource = tblSP; DataGridSanPham.AllowUserToAddRows = false; }
private void PhieuKho_GUI_Load(object sender, EventArgs e) { DataTable dt = new DataTable(); RpKho Kho = new RpKho(); dt = sp_BUS.Display(sql); Kho.SetDataSource(dt); crystalReportViewer1.ReportSource = Kho; crystalReportViewer1.Refresh(); }
private void loadSP() { tblSP = sp_BUS.Display("SELECT * FROM SANPHAM ORDER BY LOAI "); txtTenSanPham.DataSource = tblSP; txtTenSanPham.DisplayMember = "TENSP"; txtTenSanPham.ValueMember = "TENSP"; txtGiaBan.DataSource = tblSP; txtGiaBan.DisplayMember = "GiaBan"; txtGiaBan.ValueMember = "GiaBan"; txtDonVi.DataSource = tblSP; txtDonVi.DisplayMember = "DonVi"; txtDonVi.ValueMember = "DonVi"; txtLoai.DataSource = tblSP; txtLoai.DisplayMember = "Loai"; txtLoai.ValueMember = "Loai"; txtTonKho.DataSource = tblSP; txtTonKho.DisplayMember = "SoLuong"; txtTonKho.ValueMember = "SoLuong"; }