Beispiel #1
0
        private void FinaliseParticipant(ApiParticipant participant)
        {
            if (participant == null || string.IsNullOrEmpty(participant.RecordUniqueId) || !participant.OldBib.HasValue)
            {
                return;
            }

            using (var cmd = this.CreateCommand())
            {
                cmd.CommandText = "UPDATE Participants SET " + ServiceHelper.REMOTE_ID_COLUMN + " = @remoteIid, changed = 0 WHERE iid = @iid";
                cmd.Parameters.Add("@remoteIid", SqlDbType.VarChar, ServiceHelper.REMOTE_ID_COL_SIZE).Value = participant.RecordUniqueId;
                cmd.Parameters.Add("@iid", SqlDbType.Int).Value = participant.OldBib;
                cmd.ExecuteNonQuery();
            }
        }
 public ApiParticipant Put(int?id, [FromBody] ApiParticipant apiParticipant)
 {
     return(apiParticipant);
 }
 public ApiParticipant Post([FromBody] ApiParticipant apiParticipant)
 {
     return(apiParticipant);
 }