public static bool InsertLog(VehicleTypeCertificationAuditLogModel model) { var conn = ConfigurationManager.ConnectionStrings["Tuhu_log"].ConnectionString; if (SecurityHelp.IsBase64Formatted(conn)) { conn = SecurityHelp.DecryptAES(conn); } using (var dbHelper = new Tuhu.Component.Common.SqlDbHelper(conn)) { using (var cmd = new SqlCommand( @"INSERT Tuhu_log..VehicleTypeCertificationAuditLog(CarId,Author,OldValue,NewValue,Description,CreateTime) VALUES(@carId,@author,@oldValue,@newValue,@description,GETDATE());") ) { cmd.CommandType = CommandType.Text; cmd.Parameters.AddWithValue("@carId", model.CarId); cmd.Parameters.AddWithValue("@author", model.Author); cmd.Parameters.AddWithValue("@oldValue", model.OldValue); cmd.Parameters.AddWithValue("@newValue", model.NewValue); cmd.Parameters.AddWithValue("@description", model.Description); return(dbHelper.ExecuteNonQuery(cmd) > 0); } } }
public bool InsertLog(VehicleTypeCertificationAuditLogModel model) { return(DalVehicleTypeCertificationAuditLog.InsertLog(model)); }