/// <summary> /// 撮影項目を取得 /// </summary> /// <param name="reader"></param> /// <returns></returns> private static ShotItems GetShot(IDataReader reader) { ShotItems shot = new ShotItems { ShotItemName = (string)reader["ShotItemName"] }; return(shot); }
private void loadPlayerPreviousShots() { for (int i = _shotItems.Count - 1; i >= 0; i--) { if (_shotItems[i].Type == "PLAYERSHOT") { _shotItems.RemoveAt(i); } } if (_selectedPlayer != null && _selectedHole != null) { List <Shot> shots = DbConnection.GetShots(_selectedHole.HoleID, 1, _selectedPlayer.PlayerID.ToString(), _players.ToList()); foreach (Shot shot in shots) { if (shot.Round.RoundID != _selectedRound.RoundID) //don't put the current round's shot up there. it may not have been saved yet, and it will be put on preview by clicking on live preview { ShotItem shotItem = new ShotItem(); shotItem.Type = "PLAYERSHOT"; shotItem.Shots = new List <Shot>(); shotItem.Shots.Add(shot); string distance = ""; if (shot.VirtualDistance.Trim() != "") { distance = "(" + shot.VirtualDistance + " yds)"; } shotItem.Description = _selectedPlayer.LastName + " - Round " + shot.Round.RoundNum.ToString() + " drive " + distance; ShotItems.Add(shotItem); } } } }
public WorkItem(Patients patient, StudyOrders study, ShotItems shot) { this._patient = patient; this._study = study; this._shot = shot; }