/// <summary> /// Deprecated Method for adding a new object to the Scans EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> internal void AddToScans(Scan scan) { base.AddObject("Scans", scan); }
internal void AddScan(double ctdi, double dlp, int weight) { var lastScanNumber = Scans.Count; if (lastScanNumber == 20) { throw new SurveyException("This protocol already has 20 records"); } var data = new Scan(++lastScanNumber, ctdi, dlp, weight); Scans.Add(data); }
/// <summary> /// Create a new Scan object. /// </summary> /// <param name="id">Initial value of the Id property.</param> /// <param name="practice_ProtocolID">Initial value of the Practice_ProtocolID property.</param> /// <param name="scanNumber">Initial value of the ScanNumber property.</param> /// <param name="cTDI">Initial value of the CTDI property.</param> /// <param name="dLP">Initial value of the DLP property.</param> /// <param name="weight">Initial value of the Weight property.</param> public static Scan CreateScan(global::System.Guid id, global::System.Guid practice_ProtocolID, global::System.Int32 scanNumber, global::System.Double cTDI, global::System.Double dLP, global::System.Int32 weight) { Scan scan = new Scan(); scan.Id = id; scan.Practice_ProtocolID = practice_ProtocolID; scan.ScanNumber = scanNumber; scan.CTDI = cTDI; scan.DLP = dLP; scan.Weight = weight; return scan; }