public bool UpdateFromInfo(UnidadMedidaEntityKey EntityKey, UnidadMedidaEntityInfo EntityInfo) { try { UnidadMedidaEntityUpdate EntityUpdate = new UnidadMedidaEntityUpdate(); EntityUpdate.LoadFromInfo(EntityInfo); return(this.Update(EntityKey, EntityUpdate)); } catch (Exception ex) { Helpers.Logger.Logger.LogExceptionStatic(ex); throw ex; } }
public UnidadMedidaEntityInfo SearchOne(UnidadMedidaEntityKey EntityKey, bool NoUtilizar) { try { if (!EntityKey.Validate()) { throw new Exception(EntityKey.ErroresQueInvalidanLaEntidad); } return(this.DataRowToEntityInfo(this.CreateDataAccess().SearchOne(EntityKey).Rows[0])); } catch (Exception ex) { Helpers.Logger.Logger.LogExceptionStatic(ex); throw ex; } }
public DataTable SearchOne(UnidadMedidaEntityKey EntityKey) { try { if (!EntityKey.Validate()) { throw new Exception(EntityKey.ErroresQueInvalidanLaEntidad); } return(this.CreateDataAccess().SearchOne(EntityKey)); } catch (Exception ex) { Helpers.Logger.Logger.LogExceptionStatic(ex); throw ex; } }
public bool UpdateNull(UnidadMedidaEntityKey EntityKey, UnidadMedidaEntityUpdateNullFields EntityUpdateNullFields) { try { if (!EntityKey.Validate()) { return(false); } return(this.CreateDataAccess().UpdateNull(EntityKey, EntityUpdateNullFields)); } catch (Exception ex) { Helpers.Logger.Logger.LogExceptionStatic(ex); throw ex; } }
public bool Delete(UnidadMedidaEntityKey EntityKey) { DbCommand storedProcCommand = this.DataBase.GetStoredProcCommand("UnidadMedida_Delete"); try { using (storedProcCommand) { this.DataBase.AddInParameter(storedProcCommand, "UDMId", DbType.AnsiString, (object)EntityKey.UDMId); return(Convert.ToBoolean(this.DataBase.ExecuteNonQuery(storedProcCommand))); } } catch (SqlException ex) { throw ex; } catch (Exception ex) { throw ex; } }
public DataTable SearchOne(UnidadMedidaEntityKey EntityKey) { DbCommand storedProcCommand = this.DataBase.GetStoredProcCommand("UnidadMedida_Search"); try { using (storedProcCommand) { this.DataBase.AddInParameter(storedProcCommand, "OpeUDMId", DbType.String, (object)"="); this.DataBase.AddInParameter(storedProcCommand, "UDMId", DbType.AnsiString, (object)EntityKey.UDMId); return(this.DataBase.ExecuteDataSet(storedProcCommand).Tables[0]); } } catch (SqlException ex) { throw ex; } catch (Exception ex) { throw ex; } }
public bool UpdateNull(UnidadMedidaEntityKey EntityKey, UnidadMedidaEntityUpdateNullFields EntityUpdateNullFields) { DbCommand storedProcCommand = this.DataBase.GetStoredProcCommand("UnidadMedida_UpdateNulls"); try { using (storedProcCommand) { this.DataBase.AddInParameter(storedProcCommand, "UDMId", DbType.AnsiString, (object)EntityKey.UDMId); this.DataBase.AddInParameter(storedProcCommand, "FieldList", DbType.String, (object)EntityUpdateNullFields.FieldList); this.DataBase.AddInParameter(storedProcCommand, "WhereExtendido", DbType.String, (object)EntityUpdateNullFields.WhereExtendido); return(Convert.ToBoolean(this.DataBase.ExecuteNonQuery(storedProcCommand))); } } catch (SqlException ex) { throw ex; } catch (Exception ex) { throw ex; } }