public bool UpdateFromInfo(FuenteEntityKey EntityKey, FuenteEntityInfo EntityInfo) { try { FuenteEntityUpdate EntityUpdate = new FuenteEntityUpdate(); EntityUpdate.LoadFromInfo(EntityInfo); return(this.Update(EntityKey, EntityUpdate)); } catch (Exception ex) { Helpers.Logger.Logger.LogExceptionStatic(ex); throw ex; } }
public FuenteEntityInfo SearchOne(FuenteEntityKey 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(FuenteEntityKey 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(FuenteEntityKey EntityKey, FuenteEntityUpdateNullFields 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(FuenteEntityKey EntityKey) { DbCommand storedProcCommand = this.Database.GetStoredProcCommand("Fuente_Delete"); try { using (storedProcCommand) { this.Database.AddInParameter(storedProcCommand, "FntID", DbType.AnsiString, (object)EntityKey.FntID); return(Convert.ToBoolean(this.Database.ExecuteNonQuery(storedProcCommand))); } } catch (SqlException ex) { throw ex; } catch (Exception ex) { throw ex; } }
public DataTable SearchOne(FuenteEntityKey EntityKey) { DbCommand storedProcCommand = this.Database.GetStoredProcCommand("Fuente_Search"); try { using (storedProcCommand) { this.Database.AddInParameter(storedProcCommand, "OpeFntID", DbType.String, (object)"="); this.Database.AddInParameter(storedProcCommand, "FntID", DbType.AnsiString, (object)EntityKey.FntID); return(this.Database.ExecuteDataSet(storedProcCommand).Tables[0]); } } catch (SqlException ex) { throw ex; } catch (Exception ex) { throw ex; } }
public bool UpdateNull(FuenteEntityKey EntityKey, FuenteEntityUpdateNullFields EntityUpdateNullFields) { DbCommand storedProcCommand = this.Database.GetStoredProcCommand("Fuente_UpdateNulls"); try { using (storedProcCommand) { this.Database.AddInParameter(storedProcCommand, "FntID", DbType.AnsiString, (object)EntityKey.FntID); 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; } }