PageRenderTime 18ms CodeModel.GetById 7ms app.highlight 8ms RepoModel.GetById 1ms app.codeStats 0ms

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

http://blpm.googlecode.com/
C# | 112 lines | 90 code | 17 blank | 5 comment | 3 complexity | 8d45f2d1832bfd76bcdfc6d1b6b09146 MD5 | raw file
  1using System;
  2using EDUAR_DataAccess.Shared;
  3using EDUAR_Entities;
  4using System.Collections.Generic;
  5using System.Data;
  6using System.Data.SqlClient;
  7using EDUAR_Utility.Excepciones;
  8using EDUAR_Utility.Enumeraciones;
  9
 10namespace EDUAR_DataAccess.Common
 11{
 12    public class DATipoSancion : DataAccesBase<TipoSancion>
 13    {
 14        #region --[Atributos]--
 15        private const string ClassName = "DATipoSancion";
 16        #endregion
 17
 18        #region --[Constructor]--
 19        public DATipoSancion()
 20        {
 21        }
 22
 23        public DATipoSancion(DATransaction objDATransaction)
 24            : base(objDATransaction)
 25        {
 26
 27        }
 28        #endregion
 29
 30        #region --[Implementación métodos heredados]--
 31        public override string FieldID
 32        {
 33            get { throw new NotImplementedException(); }
 34        }
 35
 36        public override string FieldDescription
 37        {
 38            get { throw new NotImplementedException(); }
 39        }
 40
 41        public override TipoSancion GetById(TipoSancion entidad)
 42        {
 43            throw new NotImplementedException();
 44        }
 45
 46        public override void Create(TipoSancion entidad)
 47        {
 48            throw new NotImplementedException();
 49        }
 50
 51        public override void Create(TipoSancion entidad, out int identificador)
 52        {
 53            throw new NotImplementedException();
 54        }
 55
 56        public override void Update(TipoSancion entidad)
 57        {
 58            throw new NotImplementedException();
 59        }
 60
 61        public override void Delete(TipoSancion entidad)
 62        {
 63            throw new NotImplementedException();
 64        }
 65        #endregion
 66
 67        #region --[Métodos Públicos]--
 68		/// <summary>
 69		/// Gets the tipo sancion.
 70		/// </summary>
 71		/// <param name="entidad">The entidad.</param>
 72		/// <returns></returns>
 73		public List<TipoSancion> GetTipoSancion(TipoSancion entidad)
 74		{
 75			try
 76			{
 77				Transaction.DBcomand = Transaction.DataBase.GetStoredProcCommand("TipoSancion_Select");
 78				if (entidad != null)
 79				{
 80
 81				}
 82
 83				IDataReader reader = Transaction.DataBase.ExecuteReader(Transaction.DBcomand);
 84
 85				List<TipoSancion> listaTipoSancions = new List<TipoSancion>();
 86				TipoSancion objTipoSancion;
 87				while (reader.Read())
 88				{
 89					objTipoSancion = new TipoSancion();
 90
 91					objTipoSancion.idTipoSancion = (int)reader["idTipoSancion"];
 92					objTipoSancion.descripcion = (string)reader["descripcion"];
 93					objTipoSancion.nombre = (string)reader["nombre"];
 94
 95					listaTipoSancions.Add(objTipoSancion);
 96				}
 97				return listaTipoSancions;
 98			}
 99			catch (SqlException ex)
100			{
101				throw new CustomizedException(string.Format("Fallo en {0} - GetTipoSancion()", ClassName),
102									ex, enuExceptionType.SqlException);
103			}
104			catch (Exception ex)
105			{
106				throw new CustomizedException(string.Format("Fallo en {0} - GetTipoSancion()", ClassName),
107									ex, enuExceptionType.DataAccesException);
108			}
109		}
110		#endregion
111	}
112}