Ejemplo n.º 1
0
        /// <summary>
        /// Check the data, then add the object to the DB
        /// </summary>
        public void AddCarrierToDB()
        {
            // Create Enity
            Models.Carrier carrierToBeAdded = new Models.Carrier();

            // Fill entity
            carrierToBeAdded.CarrierName = txtName.Text;

            // Write the data to the DB
            Connections.DataConnections.DataConnectionClass.CarrierConn.AddCarrier(carrierToBeAdded);
            Connections.DataConnections.DataConnectionClass.DataLists.CarriersList.Add(Connections.DataConnections.DataConnectionClass.CarrierConn.GetCarrier(carrierToBeAdded.CarrierId));
        }
Ejemplo n.º 2
0
 public AddCarrier(string message, Object carrierToBeEdited)
 {
     InitializeComponent();
     this.message = message;
     newCarrier   = (Models.Carrier)carrierToBeEdited;
 }