Ejemplo n.º 1
0
 private void btnThu_Click(object sender, EventArgs e)
 {
     if (int.Parse(txtTongNo.Text) < int.Parse(txtTienThu.Text))
     {
         MessageBox.Show("Số tiền thu phải nhỏ hơn hoặc bằng tiền nợ!!", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Warning);
     }
     else
     {
         En_ThuTienPhat thu = new En_ThuTienPhat(maPTT, cbMaThe.Text, int.Parse(txtTienThu.Text), int.Parse(txtConLai.Text), DateTime.Today);
         Bus_ThuTienPhat.ThuTienPhat(thu);                            // Tạo phiếu thu
         Sql_TraSach.TaiKhoanNo_update(cbMaThe.Text, txtConLai.Text); // Cập nhật lại tài khoản nợ sau khi thu tiền.
         MessageBox.Show("Đã thu thành công!!", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
     rpPhieuThuTien.RefreshReport();
     btInPhieu.Enabled = true;
     btnThu.Enabled    = false;
 }
Ejemplo n.º 2
0
 public static void Tang_SLSACH(string maSach)
 {
     Sql_TraSach.Tang_SLSACH(maSach);
 }
Ejemplo n.º 3
0
 public static void TaiKhoanNo_update(string maThe, string money)
 {
     Sql_TraSach.TaiKhoanNo_update(maThe, money);
 }
Ejemplo n.º 4
0
 public static DataTable ThongTinSachMuon(string MaThe)
 {
     return(Sql_TraSach.ThongTinSachMuon(MaThe));
 }
Ejemplo n.º 5
0
 public static int LayTienNo(String MaThe)
 {
     return(Sql_TraSach.LayTienNo(MaThe));
 }
Ejemplo n.º 6
0
 public static void TraSach(En_TraSach s)
 {
     Sql_TraSach.TraSach(s);
 }