Example #1
0
        public Persona InsertPersona(Persona oPersona)
        {
            using (PersonaDataAccess tDataAccess = new PersonaDataAccess())
            {
                tDataAccess.Insert(oPersona);
            }

            return(this.GetPersonaById(oPersona));
        }
Example #2
0
 public Persona GetPersonaById(Persona oPersona)
 {
     using (PersonaDataAccess tDataAccess = new PersonaDataAccess())
     {
         DataSet ds = tDataAccess.GetByID(oPersona);
         if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
         {
             return(Persona.GetFromDataRow(ds.Tables[0].Rows[0]));
         }
     }
     return(null);
 }
Example #3
0
        public List <ItemForCombo> GetPersonaForCombo(int IdCompania)
        {
            using (PersonaDataAccess oPersonaDataAccess = new PersonaDataAccess())
            {
                DataSet ds = oPersonaDataAccess.GetPersonaForCombo(IdCompania);

                if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
                {
                    return(ItemForCombo.GetFromDS(ds));
                }
            }
            return(null);
        }
Example #4
0
 public PersonaLogic()
 {
     CatalogosDA = new PersonaDataAccess();
 }