Beispiel #1
0
        public bool Remove(VehicleTransicsLinkObject vehicleTransicsLink)
        {
            SqlCommand cmd = null;

            try
            {
                ExecuteNonQuery(out cmd, false, "VehicleTransicsLink_DELETE",
                                CreateParameter("@vehtiID", SqlDbType.Int, vehicleTransicsLink.VehtiID, ParameterDirection.Input)
                                );
                return(true);
            }
            catch (Exception exception1)
            {
                Exception innerException = exception1;
                throw new Exception(MethodBase.GetCurrentMethod().Name, innerException);
            }
            finally
            {
                if (cmd != null)
                {
                    cmd.Dispose();
                }
                cmd = null;
            }
        }
Beispiel #2
0
 public void Remove(VehicleTransicsLinkObject vehicleTransicsLink)
 {
     try
     {
         CheckTransaction();
         new VehicleTransicsLinkDataService(Transaction).Remove(vehicleTransicsLink);
         if (IsOwner)
         {
             Transaction.Commit();
         }
     }
     catch (Exception exception1)
     {
         if (IsOwner)
         {
             Transaction.Rollback();
         }
         Exception innerException = exception1;
         throw new Exception(MethodBase.GetCurrentMethod().Name, innerException);
     }
     finally
     {
         if (IsOwner)
         {
             Connection.Close();
         }
     }
 }
Beispiel #3
0
        public void Save(VehicleTransicsLinkObject vehicleTransicsLink)
        {
            SqlCommand cmd = null;

            try
            {
                ExecuteNonQuery(out cmd, false, "VehicleTransicsLink_SAVE",
                                CreateParameter("@vehtiID", SqlDbType.Int, vehicleTransicsLink.VehtiID, ParameterDirection.InputOutput),
                                CreateParameter("@transc_VehicleID", SqlDbType.Int, vehicleTransicsLink.Transc_VehicleID),
                                CreateParameter("@transi_TNR_mat", SqlDbType.Int, vehicleTransicsLink.Transi_TNR_mat)
                                );
                vehicleTransicsLink.VehtiID = (int)cmd.Parameters["@vehtiID"].Value;
            }
            catch (Exception exception1)
            {
                Exception innerException = exception1;
                throw new Exception(MethodBase.GetCurrentMethod().Name, innerException);
            }
            finally
            {
                if (cmd != null)
                {
                    cmd.Dispose();
                }
                cmd = null;
            }
        }
Beispiel #4
0
 void IEditableObject.EndEdit()
 {
     try
     {
         if (_inTxn)
         {
             _loadedTransc_VehicleID   = Transc_VehicleID;
             _loadedTransc_VehicleType = Transc_VehicleType;
             _loadedName                = Name;
             _loadedLicenseNumber       = LicenseNumber;
             _loadedEuronorm            = Euronorm;
             _loadedChassis             = Chassis;
             _loadedBrand               = Brand;
             _loadedIcon                = Icon;
             _loadedVehicleType         = VehicleType;
             _loadedVehicleTransicsLink = VehicleTransicsLink;
             _loadedContactTransics     = ContactTransics;
             _inTxn = true;
         }
     }
     catch (Exception exception1)
     {
         Exception innerException = exception1;
         throw new Exception(MethodBase.GetCurrentMethod().Name, innerException);
     }
 }