public bool UpdateWhereExtendido(string WhereEx, AlimentoNutrienteEntityUpdate EntityUpdate) { try { return(this.CreateDataAccess().UpdateWhereExtendido(WhereEx, EntityUpdate)); } catch (Exception ex) { Helpers.Logger.Logger.LogExceptionStatic(ex); throw ex; } }
public bool UpdateFromInfo(AlimentoNutrienteEntityKey EntityKey, AlimentoNutrienteEntityInfo EntityInfo) { try { AlimentoNutrienteEntityUpdate EntityUpdate = new AlimentoNutrienteEntityUpdate(); EntityUpdate.LoadFromInfo(EntityInfo); return(this.Update(EntityKey, EntityUpdate)); } catch (Exception ex) { Helpers.Logger.Logger.LogExceptionStatic(ex); throw ex; } }
public bool Update(AlimentoNutrienteEntityKey EntityKey, AlimentoNutrienteEntityUpdate EntityUpdate) { try { if (!EntityKey.Validate()) { return(false); } return(this.CreateDataAccess().Update(EntityKey, EntityUpdate)); } catch (Exception ex) { Helpers.Logger.Logger.LogExceptionStatic(ex); throw ex; } }
public bool UpdateWhereExtendido(string WhereEx, AlimentoNutrienteEntityUpdate EntityUpdate) { DbCommand storedProcCommand = this.DataBase.GetStoredProcCommand("AlimentoNutriente_UpdateWhereExtendido"); try { using (storedProcCommand) { this.DataBase.AddInParameter(storedProcCommand, "WhereExtendido", DbType.String, (object)WhereEx); this.DataBase.AddInParameter(storedProcCommand, "Cantidad", DbType.Decimal, (object)EntityUpdate.Cantidad); return(Convert.ToBoolean(this.DataBase.ExecuteNonQuery(storedProcCommand))); } } catch (SqlException ex) { throw ex; } catch (Exception ex) { throw ex; } }
public bool Update(AlimentoNutrienteEntityKey EntityKey, AlimentoNutrienteEntityUpdate EntityUpdate) { DbCommand storedProcCommand = this.DataBase.GetStoredProcCommand("AlimentoNutriente_UpdateOptionalFields"); try { using (storedProcCommand) { this.DataBase.AddInParameter(storedProcCommand, "AlimentoId", DbType.Int32, (object)EntityKey.AlimentoId); this.DataBase.AddInParameter(storedProcCommand, "NutrienteId", DbType.Int32, (object)EntityKey.NutrienteId); this.DataBase.AddInParameter(storedProcCommand, "Cantidad", DbType.Decimal, (object)EntityUpdate.Cantidad); this.DataBase.AddInParameter(storedProcCommand, "FntID", DbType.AnsiString, (object)EntityUpdate.FntID); return(Convert.ToBoolean(this.DataBase.ExecuteNonQuery(storedProcCommand))); } } catch (SqlException ex) { throw ex; } catch (Exception ex) { throw ex; } }