/Docs/07-Implementacion/Source/trunk/EDUAR_Regular/EDUAR/EDUAR_DataAccess/Common/DAMotivoCitacion.cs

http://blpm.googlecode.com/ · C# · 110 lines · 89 code · 16 blank · 5 comment · 3 complexity · d87ad5efc2a959922b5f96b2007bb9c7 MD5 · raw file

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