private void frmbaocaotheothangquynam_Load(object sender, EventArgs e) { DAO.connect(); }
private void frmsachtruyen_Load(object sender, EventArgs e) { DAO.connect(); hienthi(); }
private void frmnhaxuatban_Load(object sender, EventArgs e) { DAO.connect(); hienthi(); }
private void frmtrasach_Load(object sender, EventArgs e) { DAO.connect(); loaddata(); }
private void frmkhachhang_Load(object sender, EventArgs e) { DAO.connect(); hienthi(); }
private void hienthi() { txthienthi.Text = DAO.GetFieldValues("select sum(DATEDIFF(day,c.ngaythue,f.ngaytra)*(a.dongiathue)+i.tienphat) as [tong tien hoa don thue] from sachtruyen a join chitietthuesach b on a.masach = b.masach join thuesach c on c.mathue = b.mathue join chitiettrasach d on d.masach = a.masach join trasach f on f.matra = d.matra join vipham i on i.mavipham = d.mavipham where datepart(month,f.ngaytra)='" + txtdtt.Text + "' and datepart(year, f.ngaytra) = '" + txtnam.Text + "'"); }
private void Frmdt_Load(object sender, EventArgs e) { DAO.connect(); }
private void frmchitietthuesach_Load(object sender, EventArgs e) { DAO.connect(); loaddata(); }
private void button1_Click(object sender, EventArgs e) { txtsoluong.Text = DAO.GetFieldValues("SELECT sachtruyen.soluong FROM sachtruyen join chitietthuesach on sachtruyen.masach=chitietthuesach.masach WHERE sachtruyen.masach = N'" + txtmasach.Text + "'"); }