/Docs/07-Implementacion/Source/trunk/EDUAR_actual/EDUAR/EDUAR_DataAccess/Common/DAValoresEscalaCalificacion.cs

http://blpm.googlecode.com/ · C# · 107 lines · 88 code · 15 blank · 4 comment · 1 complexity · 2500391d2d95424e41ebdfe020a9f2ec MD5 · raw file

  1. using System;
  2. using EDUAR_DataAccess.Shared;
  3. using EDUAR_Entities;
  4. using EDUAR_Utility.Excepciones;
  5. using EDUAR_Utility.Enumeraciones;
  6. using System.Data.SqlClient;
  7. using System.Data;
  8. namespace EDUAR_DataAccess.Common
  9. {
  10. public class DAValoresEscalaCalificacion : DataAccesBase<ValoresEscalaCalificacion>
  11. {
  12. #region --[Atributos]--
  13. private const string ClassName = "DAValoresEscalaCalificacion";
  14. #endregion
  15. #region --[Constructor]--
  16. public DAValoresEscalaCalificacion()
  17. {
  18. }
  19. public DAValoresEscalaCalificacion(DATransaction objDATransaction)
  20. : base(objDATransaction)
  21. {
  22. }
  23. #endregion
  24. #region --[Implementación métodos heredados]--
  25. public override string FieldID
  26. {
  27. get { throw new NotImplementedException(); }
  28. }
  29. public override string FieldDescription
  30. {
  31. get { throw new NotImplementedException(); }
  32. }
  33. public override ValoresEscalaCalificacion GetById(ValoresEscalaCalificacion entidad)
  34. {
  35. throw new NotImplementedException();
  36. }
  37. public override void Create(ValoresEscalaCalificacion entidad)
  38. {
  39. throw new NotImplementedException();
  40. }
  41. public override void Create(ValoresEscalaCalificacion entidad, out int identificador)
  42. {
  43. throw new NotImplementedException();
  44. }
  45. public override void Update(ValoresEscalaCalificacion entidad)
  46. {
  47. throw new NotImplementedException();
  48. }
  49. public override void Delete(ValoresEscalaCalificacion entidad)
  50. {
  51. throw new NotImplementedException();
  52. }
  53. #endregion
  54. #region --[Métodos Públicos]--
  55. /// <summary>
  56. /// Gets the nivel probacion.
  57. /// </summary>
  58. /// <returns></returns>
  59. public ValoresEscalaCalificacion GetNivelProbacion()
  60. {
  61. try
  62. {
  63. Transaction.DBcomand = Transaction.DataBase.GetStoredProcCommand("NivelAprobacion_Select");
  64. IDataReader reader = Transaction.DataBase.ExecuteReader(Transaction.DBcomand);
  65. ValoresEscalaCalificacion valorEscala;
  66. while (reader.Read())
  67. {
  68. valorEscala = new ValoresEscalaCalificacion();
  69. valorEscala.nombre = reader["nombre"].ToString();
  70. valorEscala.idValorEscalaCalificacion = Convert.ToInt32(reader["idValorEscalaCalificacion"]);
  71. valorEscala.descripcion = reader["descripcion"].ToString();
  72. valorEscala.aprobado =(bool)reader["aprobado"];
  73. valorEscala.activo =(bool)reader["activo"];
  74. valorEscala.valor = reader["valor"].ToString();
  75. return valorEscala;
  76. }
  77. return null;
  78. }
  79. catch (SqlException ex)
  80. {
  81. throw new CustomizedException(string.Format("Fallo en {0} - GetNivelProbacion()", ClassName),
  82. ex, enuExceptionType.SqlException);
  83. }
  84. catch (Exception ex)
  85. {
  86. throw new CustomizedException(string.Format("Fallo en {0} - GetNivelProbacion()", ClassName),
  87. ex, enuExceptionType.DataAccesException);
  88. }
  89. }
  90. #endregion
  91. }
  92. }