public bool UpdateCT_XuatKho(CT_XuatKhoDTO dtoCT_XuatKho)
 {
     string strQuery = "Update CT_XUATKHO Set ";
     strQuery += "MAMATHANG = N'" + dtoCT_XuatKho.MaMatHang + "',";
     strQuery += "SOLUONGXUAT = " + dtoCT_XuatKho.SoLuongXuat + ",";
     strQuery += "GIATIEN = " + dtoCT_XuatKho.GiaTien + ",";
     strQuery += "THANHTIEN = " + dtoCT_XuatKho.ThanhTien ;
     strQuery += "Where MAHOADONXUAT = N'" + dtoCT_XuatKho.MaHoaDonXuat + "'";
     return dp.ExecuteNonQuery(strQuery);
 }
 public bool InsertCT_XuatKho(CT_XuatKhoDTO dtoCT_XuatKho)
 {
     string strQuery = "Insert Into CT_XUATKHO Values(";
     strQuery += "N'" + dtoCT_XuatKho.MaCTXuatKho + "',";
     strQuery += "N'" + dtoCT_XuatKho.MaXuatKho + "',";
     strQuery += "N'" + dtoCT_XuatKho.MaMatHang + "',";
     strQuery += dtoCT_XuatKho.SoLuongXuat + ",";
     strQuery += dtoCT_XuatKho.GiaTien + ",";
     strQuery += dtoCT_XuatKho.ThanhTien + "," + dtoCT_XuatKho.TinhTrang + ")";
     return dp.ExecuteNonQuery(strQuery);
 }
 public bool InsertCT_XuatKho(CT_XuatKhoDTO dtoCT_XuatKho)
 {
     return dalCTXuatKho.InsertCT_XuatKho(dtoCT_XuatKho);
 }
Exemplo n.º 4
0
 private CT_XuatKhoDTO LayThongTinChiTietXuatKho(XuatKhoDTO dtoNhapKho, int i)
 {
     CT_XuatKhoDTO dtoCTXuat = new CT_XuatKhoDTO();
     dtoCTXuat.MaCTXuatKho = cf.CreateId("CTX", "CT_XUATKHO");
     dtoCTXuat.MaXuatKho = dtoNhapKho.MaXuatKho;
     double dbGia = double.Parse(dgvMatHang.Rows[i].Cells["colGia"].Value.ToString());
     dtoCTXuat.GiaTien = dbGia;
     dtoCTXuat.MaMatHang = dgvMatHang.Rows[i].Cells["colMaMatHang"].Value.ToString();
     dtoCTXuat.SoLuongXuat = int.Parse(dgvMatHang.Rows[i].Cells["colSoLuong"].Value.ToString());
     dtoCTXuat.ThanhTien = double.Parse(dgvMatHang.Rows[i].Cells["colThanhTien"].Value.ToString());
     dtoCTXuat.TinhTrang = "1";
     return dtoCTXuat;
 }