Пример #1
0
 //UPDATE
 public void LabTesting_Update(LabTesting Lab)
 {
     Sql.ExecuteNonQuery("SAP", "UPDATE [SYNC_NUTRICIEL].[dbo].[tbl_LabTesting]" +
                         " SET " +
                         "[Testing_Code] ='" + Lab.Testing_Code.ToString() + "'" +
                         ",[Customer_Code] = '" + Lab.Customer_Code.ToString() + "' " +
                         ",[Testing_Name] = '" + Lab.Testing_Name.ToString() + "' " +
                         ",[Created_Date] = '" + Lab.Created_Date.ToString() + "' " +
                         ",[Created_By] = '" + Lab.Created_By.ToString() + "' " +
                         ",[Testing_Period_Time] = '" + Lab.Testing_Period_Time.ToString() + "' " +
                         ",[Testing_Result_Receive_Time] = '" + Lab.Testing_Result_Receive_Time.ToString() + "' " +
                         "WHERE ID=" + int.Parse(Lab.ID.ToString()), CommandType.Text);
 }
Пример #2
0
 //INSERT
 public void LabTesting_Insert(LabTesting Lab)
 {
     Sql.ExecuteNonQuery("SAP", "INSERT INTO [SYNC_NUTRICIEL].[dbo].[tbl_LabTesting]" +
                         "([Testing_Code] " +
                         ",[Customer_Code] " +
                         ",[Testing_Name] " +
                         ",[Created_Date] " +
                         ",[Created_By] " +
                         ",[Testing_Period_Time] " +
                         ",[Testing_Result_Receive_Time]) " +
                         "VALUES " +
                         "('" + Lab.Testing_Code.ToString() + "'" +
                         ",'" + Lab.Customer_Code.ToString() + "'" +
                         ",'" + Lab.Testing_Name.ToString() + "'" +
                         ",'" + Lab.Created_Date.ToString() + "'" +
                         ",'" + Lab.Created_By.ToString() + "'" +
                         ",'" + Lab.Testing_Period_Time.ToString() + "'" +
                         ",'" + Lab.Testing_Result_Receive_Time.ToString() + "')", CommandType.Text);
 }