public void ReadTrackBase(TrackBase track) { if (track.TrackId > -1) { TrackId = track.TrackId; } if (track.ConferenceId > -1) { ConferenceId = track.ConferenceId; } SessionVoting = track.SessionVoting; if (!String.IsNullOrEmpty(track.BackgroundColor)) { BackgroundColor = track.BackgroundColor; } if (track.Sort > -1) { Sort = track.Sort; } if (!String.IsNullOrEmpty(track.Title)) { Title = track.Title; } if (!String.IsNullOrEmpty(track.Description)) { Description = track.Description; } }
public ActionResult Edit(TrackBase track) { var previousRecord = _repository.GetTrack(track.ConferenceId, track.TrackId); if (previousRecord == null) { _repository.AddTrack(ref track, User.UserID); } else { track.CreatedOnDate = previousRecord.CreatedOnDate; track.CreatedByUserID = previousRecord.CreatedByUserID; _repository.UpdateTrack(track, User.UserID); } return ReturnRoute(track.ConferenceId, View("View", _repository.GetTrack(track.ConferenceId, track.TrackId))); }
public TrackBase GetTrackBase() { TrackBase res = new TrackBase(); res.TrackId = TrackId; res.ConferenceId = ConferenceId; res.SessionVoting = SessionVoting; res.BackgroundColor = BackgroundColor; res.Sort = Sort; res.Title = Title; res.Description = Description; res.CreatedByUserID = CreatedByUserID; res.CreatedOnDate = CreatedOnDate; res.LastModifiedByUserID = LastModifiedByUserID; res.LastModifiedOnDate = LastModifiedOnDate; return res; }
public TrackBase GetTrackBase() { TrackBase res = new TrackBase(); res.TrackId = TrackId; res.ConferenceId = ConferenceId; res.SessionVoting = SessionVoting; res.BackgroundColor = BackgroundColor; res.Sort = Sort; res.Title = Title; res.Description = Description; res.CreatedByUserID = CreatedByUserID; res.CreatedOnDate = CreatedOnDate; res.LastModifiedByUserID = LastModifiedByUserID; res.LastModifiedOnDate = LastModifiedOnDate; return(res); }
public void ReadTrackBase(TrackBase track) { if (track.TrackId > -1) TrackId = track.TrackId; if (track.ConferenceId > -1) ConferenceId = track.ConferenceId; SessionVoting = track.SessionVoting; if (!String.IsNullOrEmpty(track.BackgroundColor)) BackgroundColor = track.BackgroundColor; if (track.Sort > -1) Sort = track.Sort; if (!String.IsNullOrEmpty(track.Title)) Title = track.Title; if (!String.IsNullOrEmpty(track.Description)) Description = track.Description; }