Ejemplo n.º 1
0
        // transfer model to data and insert, on transaction
        // links:
        //  docLink: http://sql2x.org/documentationLink/fbeb7c34-b2d7-403b-a9fd-503ab705ef81
        public void Insert(CrudeFlightSegmentEventModel model, SqlConnection connection, SqlTransaction transaction)
        {
            var data = new CrudeFlightSegmentEventData();

            ModelToData(model, data);
            data.Insert(connection, transaction);
        }
Ejemplo n.º 2
0
        // transfer model to data and insert
        // links:
        //  docLink: http://sql2x.org/documentationLink/17cd8423-3c78-459f-a45b-773fcfbc3b7d
        public void Insert(CrudeFlightSegmentEventModel model)
        {
            var data = new CrudeFlightSegmentEventData();

            ModelToData(model, data);
            data.Insert();
        }
Ejemplo n.º 3
0
        // insert all object members as a new row in table
        // links:
        //  docLink: http://sql2x.org/documentationLink/75aad010-e6aa-4f19-a6e5-597456aa20d8
        public void Insert(CrudeFlightSegmentEventContract contract)
        {
            var data = new CrudeFlightSegmentEventData();

            ContractToData(contract, data);
            data.Insert();
        }
Ejemplo n.º 4
0
        // insert all object members as a new row in table, in a transaction
        // the transaction and or connection state is not changed in any way other than what SqlClient does to it.
        // it is the callers responsibility to commit or rollback the transaction
        // links:
        //  docLink: http://sql2x.org/documentationLink/542f9458-c3b9-4edf-8575-0870086f3a7f
        public void Insert(CrudeFlightSegmentEventContract contract, SqlConnection connection, SqlTransaction transaction)
        {
            var data = new CrudeFlightSegmentEventData();

            ContractToData(contract, data);
            data.Insert(connection, transaction);
        }
Ejemplo n.º 5
0
        public void AddFlightSegmentEvent(
            SqlConnection connection,
            SqlTransaction transaction,
            Guid flightSegmentId,
            string dateTimeTypeRcd,
            DateTime dateTimeOfEvent,
            Guid userId
            )
        {
            var flightSegmentEvent = new CrudeFlightSegmentEventData();

            flightSegmentEvent.FlightSegmentId = flightSegmentId;

            flightSegmentEvent.FlightSegmentEventNumber =
                Flight.FlightSegmentEventHighestNumber(
                    connection,
                    transaction,
                    flightSegmentId
                    ) + 1;

            flightSegmentEvent.DateTimeTypeRcd = dateTimeTypeRcd;
            flightSegmentEvent.NewDateTime     = dateTimeOfEvent;
            flightSegmentEvent.DateTime        = DateTime.UtcNow;
            flightSegmentEvent.UserId          = userId;
            flightSegmentEvent.Insert(connection, transaction);
        }