public bool Update(aspnet_RolesEntityKey EntityKey, aspnet_RolesEntityUpdate EntityUpdate) { DbCommand storedProcCommand = this.DataBase.GetStoredProcCommand("aspnet_Roles_UpdateOptionalFields"); try { using (storedProcCommand) { this.DataBase.AddInParameter(storedProcCommand, "RoleId", DbType.Guid, (object)EntityKey.RoleId); this.DataBase.AddInParameter(storedProcCommand, "ApplicationId", DbType.Guid, (object)EntityUpdate.ApplicationId); this.DataBase.AddInParameter(storedProcCommand, "RoleName", DbType.String, (object)EntityUpdate.RoleName); this.DataBase.AddInParameter(storedProcCommand, "LoweredRoleName", DbType.String, (object)EntityUpdate.LoweredRoleName); this.DataBase.AddInParameter(storedProcCommand, "Description", DbType.String, (object)EntityUpdate.Description); this.DataBase.AddInParameter(storedProcCommand, "LongDescription", DbType.AnsiString, (object)EntityUpdate.LongDescription); return(Convert.ToBoolean(this.DataBase.ExecuteNonQuery(storedProcCommand))); } } catch (SqlException ex) { throw ex; } catch (Exception ex) { throw ex; } }
public bool UpdateFromInfo(aspnet_RolesEntityKey EntityKey, aspnet_RolesEntityInfo EntityInfo) { try { aspnet_RolesEntityUpdate EntityUpdate = new aspnet_RolesEntityUpdate(); EntityUpdate.LoadFromInfo(EntityInfo); return(this.Update(EntityKey, EntityUpdate)); } catch (Exception ex) { Helpers.Logger.Logger.LogExceptionStatic(ex); throw ex; } }
public aspnet_RolesEntityInfo SearchOne(aspnet_RolesEntityKey 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(aspnet_RolesEntityKey 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(aspnet_RolesEntityKey EntityKey, aspnet_RolesEntityUpdateNullFields 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(aspnet_RolesEntityKey EntityKey) { DbCommand storedProcCommand = this.DataBase.GetStoredProcCommand("aspnet_Roles_Delete"); try { using (storedProcCommand) { this.DataBase.AddInParameter(storedProcCommand, "RoleId", DbType.Guid, (object)EntityKey.RoleId); return(Convert.ToBoolean(this.DataBase.ExecuteNonQuery(storedProcCommand))); } } catch (SqlException ex) { throw ex; } catch (Exception ex) { throw ex; } }
public DataTable SearchOne(aspnet_RolesEntityKey EntityKey) { DbCommand storedProcCommand = this.DataBase.GetStoredProcCommand("aspnet_Roles_Search"); try { using (storedProcCommand) { this.DataBase.AddInParameter(storedProcCommand, "OpeRoleId", DbType.String, (object)"="); this.DataBase.AddInParameter(storedProcCommand, "RoleId", DbType.Guid, (object)EntityKey.RoleId); return(this.DataBase.ExecuteDataSet(storedProcCommand).Tables[0]); } } catch (SqlException ex) { throw ex; } catch (Exception ex) { throw ex; } }
public bool UpdateNull(aspnet_RolesEntityKey EntityKey, aspnet_RolesEntityUpdateNullFields EntityUpdateNullFields) { DbCommand storedProcCommand = this.DataBase.GetStoredProcCommand("aspnet_Roles_UpdateNulls"); try { using (storedProcCommand) { this.DataBase.AddInParameter(storedProcCommand, "RoleId", DbType.Guid, (object)EntityKey.RoleId); 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; } }