public static VehicleTransicsLinkObject VehicleTransicsLinkRowToObject(DataRow VehicleTransicsLink) { VehicleTransicsLinkObject obj = new VehicleTransicsLinkObject(); try { if (VehicleTransicsLink != null) { if (RowFunctions.GetValueFromRowToInteger(VehicleTransicsLink, VehicleTransicsLinkObject.VEHTI_ID, false, DataRowVersion.Current) != 0) { obj.VehtiID = RowFunctions.GetValueFromRowToInteger(VehicleTransicsLink, VehicleTransicsLinkObject.VEHTI_ID, true, DataRowVersion.Current); obj.Transi_TNR_mat = RowFunctions.GetValueFromRowToInteger(VehicleTransicsLink, VehicleTransicsLinkObject.TRANSI_TNR_MAT, false, DataRowVersion.Current); obj.Transc_VehicleID = RowFunctions.GetValueFromRowToInteger(VehicleTransicsLink, VehicleTransicsLinkObject.TRANSC_VEHICLEID, false, DataRowVersion.Current); } return(obj); } obj = null; } catch (System.Exception exception1) { Exception innerException = exception1; throw new Exception(MethodBase.GetCurrentMethod().Name, innerException); } return(obj); }
public int Add(VehicleTransicsLinkObject value) { try { return(List.Add(value)); } catch (System.Exception exception1) { Exception innerException = exception1; throw new Exception(MethodBase.GetCurrentMethod().Name, innerException); } }
public void Remove(VehicleTransicsLinkObject value) { try { List.Remove(value); } catch (System.Exception exception1) { Exception innerException = exception1; throw new Exception(MethodBase.GetCurrentMethod().Name, innerException); } }
// Called by VehicleTransicsLinkObject when it changes internal void VehicleTransicsLinkObjectChanged(VehicleTransicsLinkObject VehicleTransicsLink) { try { int index = List.IndexOf(VehicleTransicsLink); OnListChanged(new ListChangedEventArgs(ListChangedType.ItemChanged, index)); } catch (System.Exception exception1) { Exception innerException = exception1; throw new Exception(MethodBase.GetCurrentMethod().Name, innerException); } }
// Methods. object IBindingList.AddNew() { try { VehicleTransicsLinkObject VehicleTransicsLink = new VehicleTransicsLinkObject(); List.Add(VehicleTransicsLink); return(VehicleTransicsLink); } catch (System.Exception exception1) { Exception innerException = exception1; throw new Exception(MethodBase.GetCurrentMethod().Name, innerException); } }
protected override void OnRemoveComplete(int index, object value) { try { VehicleTransicsLinkObject VehicleTransicsLink = (VehicleTransicsLinkObject)value; VehicleTransicsLink.Parent = this; OnListChanged(new ListChangedEventArgs(ListChangedType.ItemDeleted, index)); } catch (System.Exception exception1) { Exception innerException = exception1; throw new Exception(MethodBase.GetCurrentMethod().Name, innerException); } }
protected override void OnSetComplete(int index, object oldValue, object newValue) { try { if (oldValue != newValue) { VehicleTransicsLinkObject oldVehicleTransicsLink = (VehicleTransicsLinkObject)oldValue; VehicleTransicsLinkObject newVehicleTransicsLink = (VehicleTransicsLinkObject)newValue; oldVehicleTransicsLink.Parent = null; newVehicleTransicsLink.Parent = this; OnListChanged(new ListChangedEventArgs(ListChangedType.ItemAdded, index)); } } catch (System.Exception exception1) { Exception innerException = exception1; throw new Exception(MethodBase.GetCurrentMethod().Name, innerException); } }
public static VehicleTransicsLinkObject VehicleTransicsLinkRowToObject(DataRow VehicleTransicsLink) { VehicleTransicsLinkObject obj = new VehicleTransicsLinkObject(); try { if (VehicleTransicsLink != null) { if (RowFunctions.GetValueFromRowToInteger(VehicleTransicsLink, VehicleTransicsLinkObject.VEHTI_ID, false, DataRowVersion.Current) != 0) { obj.VehtiID = RowFunctions.GetValueFromRowToInteger(VehicleTransicsLink, VehicleTransicsLinkObject.VEHTI_ID, true, DataRowVersion.Current); obj.Transi_TNR_mat = RowFunctions.GetValueFromRowToInteger(VehicleTransicsLink, VehicleTransicsLinkObject.TRANSI_TNR_MAT, false, DataRowVersion.Current); obj.Transc_VehicleID = RowFunctions.GetValueFromRowToInteger(VehicleTransicsLink, VehicleTransicsLinkObject.TRANSC_VEHICLEID, false, DataRowVersion.Current); } return obj; } obj = null; } catch (System.Exception exception1) { Exception innerException = exception1; throw new Exception(MethodBase.GetCurrentMethod().Name, innerException); } return obj; }
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; } }
// Methods. object IBindingList.AddNew() { try { VehicleTransicsLinkObject VehicleTransicsLink = new VehicleTransicsLinkObject(); List.Add(VehicleTransicsLink); return VehicleTransicsLink; } catch (System.Exception exception1) { Exception innerException = exception1; throw new Exception(MethodBase.GetCurrentMethod().Name, innerException); } }
public int Add(VehicleTransicsLinkObject value) { try { return List.Add(value); } catch (System.Exception exception1) { Exception innerException = exception1; throw new Exception(MethodBase.GetCurrentMethod().Name, innerException); } }
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; } }
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); } }