/// <summary> /// Creates new <see cref="SegmentsRow"/> row and assigns default values /// </summary> /// <param name="pPrefix">prefix for new segments names that are created</param> /// <param name="pProtocolID">Foreign key for <see cref="ProtocolDataTable"/></param> /// <returns>New <see cref="SegmentsRow"/></returns> public SegmentsRow NewSegmentsRow(long pProtocolID, string pPrefix) { SegmentsRow sg = NewSegmentsRow(); sg.Name = string.Format("{1}{2}Segment{0}", sg.SegmentID.ToString(), pPrefix, m_IdentSep); sg.ProtocolID = pProtocolID; return(sg); }
/// <summary> /// Creates new <see cref="SegmentsRow"/> row and assigns default values /// </summary> /// <param name="pPrefix">prefix for new segments names that are created</param> /// <param name="pProtocolID">Foreign key for <see cref="ProtocolDataTable"/></param> /// <param name="pRowToBeCopied">New row is a shallow copy of the current rowToPaste</param> /// <returns>New <see cref="SegmentsRow"/>A shallow copy of the current rowToPaste</returns> public void NewSegmentsRow(long pProtocolID, SegmentsRow pRowToBeCopied, string pPrefix) { SegmentsRow sg = NewSegmentsRow(pProtocolID, pPrefix); sg.Address = pRowToBeCopied.Address; sg.TimeScan = pRowToBeCopied.TimeScan; sg.KeepConnect = pRowToBeCopied.KeepConnect; sg.PickupConn = pRowToBeCopied.PickupConn; sg.timeKeepConn = pRowToBeCopied.timeKeepConn; sg.TimeReconnect = pRowToBeCopied.TimeReconnect; sg.TimeIdleKeepConn = pRowToBeCopied.TimeIdleKeepConn; AddSegmentsRow(sg); return; }