public void PO_Header_INSERT(PO_Header OBJ)
    {
        Sql.ExecuteNonQuery("SAP", "INSERT INTO [SYNC_NUTRICIEL].[dbo].[tbl_PO_Header_LAB] " +
       " ([SoPO] " +
       " ,[VENDCode] " +
       " ,[VENDName] " +
       " ,[NgayLapPO] " +
       " ,[NgayGiaoHang] " +
       " ,[DiaChiGiaoHang] " +
       " ,[PaymentTerm] " +
       " ,[CreatedDate] " +
       " ,[CreatedBy] " +
       " ,[Note] " +
       " ,[Discount] " +
       " ,[Locked]) " +
 " VALUES " +
       "(N'" + OBJ.SoPO +
       "',N'" + OBJ.VENDCode +
       "',N'" + OBJ.VENDName +
       "',CONVERT(datetime,'" + OBJ.NgayLapPO +
       "',103),CONVERT(datetime,'" + OBJ.NgayGiaoHang +
       "',103),N'" + OBJ.DiaChiGiaoHang +
       "','" + OBJ.PaymentTerm +
       "',CONVERT(datetime,'" + DateTime.Now +
       "',103),N'" + OBJ.CreatedBy +
       "',N'" + OBJ.Note +
       "',N'" + OBJ.Discount +
       "','" + OBJ.Locked +
       "')", CommandType.Text);
    }
 public void PO_Header_UPDATE(PO_Header OBJ)
 {
     Sql.ExecuteNonQuery("SAP", "UPDATE [SYNC_NUTRICIEL].[dbo].[tbl_PO_Header_LAB] SET " +
    "[SoPO]                                              = N'" + OBJ.SoPO + "'" +
    "[VENDCode]                                          = N'" + OBJ.VENDCode + "'" +
    ",[VENDName]                                         = N'" + OBJ.VENDName + "'" +
    ",[NgayLapPO]                                        = CONVERT(datetime,'" + OBJ.NgayLapPO + "',103)" +
    ",[NgayGiaoHang]                                     = CONVERT(datetime,'" + OBJ.NgayGiaoHang + "',103)" +
    ",[DiaChiGiaoHang]                                   = N'" + OBJ.DiaChiGiaoHang + "'" +
    ",[PaymentTerm]                                      = N'" + OBJ.PaymentTerm + "'" +
    ",[CreatedDate]                                      = CONVERT(datetime,'" + DateTime.Now + "',103)" +
    ",[CreatedBy]                                        = N'" + OBJ.CreatedBy + "' " +
    ",[Note]                                             = N'" + OBJ.Note + "' " +
    ",[Discount]                                             = N'" + OBJ.Discount + "' " +
    ",[Locked]                                           = '" + OBJ.Locked + "' " +
    " WHERE [ID]                                         = " + OBJ.ID, CommandType.Text);
 }
 public void PO_Header_INSERT(PO_Header OBJ)
 {
     DAO.PO_Header_INSERT(OBJ);
 }
 public void PO_Header_UPDATE(PO_Header OBJ)
 {
     DAO.PO_Header_UPDATE(OBJ);
 }