private Planillas SelectOnePlanillas(Int16 EMPR_Codigo, String PLAN_Tipo, String PLAN_Codigo)
 {
     try
     {
         Planillas item = new Planillas();
         DataAccessEnterpriseSQL.DAAsignarProcedure("CAJ_PLANSS_UnReg");
         DataAccessEnterpriseSQL.DAAgregarParametro("@psinEMPR_Codigo", EMPR_Codigo, SqlDbType.SmallInt, 2, ParameterDirection.Input);
         DataAccessEnterpriseSQL.DAAgregarParametro("@pchrPLAN_Tipo", PLAN_Tipo, SqlDbType.Char, 3, ParameterDirection.Input);
         DataAccessEnterpriseSQL.DAAgregarParametro("@pvchPLAN_Codigo", PLAN_Codigo, SqlDbType.VarChar, 20, ParameterDirection.Input);
         using (IDataReader reader = DataAccessEnterpriseSQL.DAExecuteReader())
         {
             if (reader.Read())
             {
                 LoaderPlanillas            = new BusinessEntityLoader <Planillas>();
                 LoaderPlanillas.EntityType = item.GetType();
                 LoaderPlanillas.LoadEntity(reader, item);
                 item.Instance = InstanceEntity.Unchanged;
             }
             else
             {
                 throw new Exception("No se encontro el registro.");
             }
         }
         return(item);
     }
     catch (Exception)
     { throw; }
 }
Esempio n. 2
0
        public BLPlanillas(IUnityContainer container)
        {
            this.ContainerService = container;
            Loader = new BusinessEntityLoader <Planillas>();
            Planillas Item = new Planillas();

            Loader.EntityType = Item.GetType();
        }