Ejemplo n.º 1
0
 public EntityGrupo SelectByKey(KeyGrupo oKeyGrupo)
 {
     try
     {
         return(GrupoApp.SelectByKey(oKeyGrupo));
     }
     catch (Exception)
     {
         throw new FaultException("Error al seleccionar Grupos");
     }
 }
Ejemplo n.º 2
0
 public EntityGrupo SelectByKey(KeyGrupo oKeyGrupo)
 {
     try
     {
         return(GrupoService.SelectByKey(oKeyGrupo));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Ejemplo n.º 3
0
 public EntityGrupo SelectByKey(KeyGrupo okey, CTransaction oCTransaction)
 {
     try
     {
         DataGrupoRepository data = new DataGrupoRepository(EntityGrupo.Empty, "grupo");
         return(data.SelectByKey(okey, oCTransaction));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Ejemplo n.º 4
0
 public EntityGrupo SelectByKey(KeyGrupo oKeyGrupo)
 {
     try
     {
         CTransaction oCTransaction = CTransaction.Empty;
         return(Repo.SelectByKey(oKeyGrupo, oCTransaction));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Ejemplo n.º 5
0
 public EntityGrupo(
     Keys.KeyGrupo okey,
     Int32 okeyPadre,
     String oDescripcionCorta,
     String oDescripcionLarga,
     Int32 oEstado)
 {
     this.key              = okey;
     this.idPadre          = okeyPadre;
     this.descripcionCorta = oDescripcionCorta;
     this.descripcionLarga = oDescripcionLarga;
     this.estado           = oEstado;
 }
Ejemplo n.º 6
0
        public EntityGrupo Insert(EntityGrupo oEntityGrupo, CTransaction oCTransaction)
        {
            try
            {
                DataGrupoRepository data = new DataGrupoRepository(oEntityGrupo, "grupo");
                oEntityGrupo = data.Insert(oCTransaction);
                KeyGrupo key = new KeyGrupo(DataCreator.CreateInt32(data.CollectionParams.GetParameter("IDGrupo").Value));
                oEntityGrupo.Key = key;

                return(oEntityGrupo);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Ejemplo n.º 7
0
        public EntityGrupo SelectByKey(KeyGrupo okey, CTransaction oCTransaction)
        {
            DataProcedure run = new DataProcedure();

            run.CollectionParams.AddInputParameter("IDGrupo", okey.IDGrupo);

            using (IDataReader reader = run.ExecuteReader(oCTransaction, Procedimientos.Grupo_Select))
            {
                if (reader.Read())
                {
                    return(EntityGrupo.Create(reader));
                }
            }

            return(EntityGrupo.Empty);
        }
Ejemplo n.º 8
0
        public ActionResult Edit(KeyGrupo oKey)
        {
            GrupoServicesController   oServices        = new GrupoServicesController();
            UsuarioServicesController oUsuarioServices = new UsuarioServicesController();

            GrupoViewModel oGrupoViewModel = new GrupoViewModel();

            EntityGrupo oEntityGrupo = oServices.SelectByKey(oKey);

            oGrupoViewModel.EntityGrupo = oEntityGrupo;
            oGrupoViewModel.ListGrupo   = oServices.Select
                                              (new EntityGrupo
            {
                IDGrupoPadre = Constantes.UnoNegativo,
                Key          = new KeyGrupo {
                    IDGrupo = Constantes.UnoNegativo
                }
            }
                                              );
            return(PartialView(Constantes.GrupoEdit, oGrupoViewModel));
        }
Ejemplo n.º 9
0
 public ActionResult InnerEdit(KeyGrupo key)
 {
     return(Edit(key));
 }