示例#1
0
 public void Present(PresentAnsward value)
 {
     using (var connection = new SqlConnection(_connectionString))
     {
         var cmd = connection.CreateCommand();
         cmd.CommandType = CommandType.StoredProcedure;
         cmd.CommandText = "AddPresentAnsward";
         cmd.Parameters.AddWithValue(@"ID_User", value.ID_User);
         cmd.Parameters.AddWithValue(@"ID_Answard", value.ID_Answard);
         var id = new SqlParameter
         {
             DbType        = DbType.Int32,
             ParameterName = "@ID",
             Direction     = ParameterDirection.Output
         };
         cmd.Parameters.Add(id);
         connection.Open();
         cmd.ExecuteNonQuery();
     }
 }
 public void Present(PresentAnsward value)
 {
     answardDao.Present(value);
 }