Esempio n. 1
0
 public ClienteEntity(string rut, string razonSocial, string direccion, string telefono, ActividadEmpresaEntity actividad, TipoEmpresaEntity tipo)
 {
     this.Rut         = rut;
     this.RazonSocial = razonSocial;
     this.Direccion   = direccion;
     this.Telefono    = telefono;
     this.Actividad   = actividad;
     this.Tipo        = tipo;
 }
Esempio n. 2
0
 public ClienteEntity()
 {
     this.Rut         = "";
     this.RazonSocial = "";
     this.Direccion   = "";
     this.Telefono    = "";
     this.Actividad   = new ActividadEmpresaEntity();
     this.Tipo        = new TipoEmpresaEntity();
 }
Esempio n. 3
0
 public ClienteEntity(string rut, string razonSocial, string direccion, string telefono, string nombreContacto, string mailContacto, ActividadEmpresaEntity actividad, TipoEmpresaEntity tipo)
 {
     this.Rut            = "";
     this.RazonSocial    = "";
     this.Direccion      = "";
     this.Telefono       = "";
     this.Actividad      = new ActividadEmpresaEntity();
     this.Tipo           = new TipoEmpresaEntity();
     this.MailContacto   = mailContacto;
     this.NombreContacto = nombreContacto;
 }
Esempio n. 4
0
        public void IntegridadTipoEmpresaEntity()
        {
            int    id          = 1;
            string descripcion = "testtesttesttest";

            TipoEmpresaEntity tipoE = new TipoEmpresaEntity(
                id, descripcion);

            Assert.AreEqual(id, tipoE.Id);
            Assert.AreEqual(descripcion, tipoE.Descripcion);
        }
Esempio n. 5
0
        public TipoEmpresaEntity BuscarPorId(int id)
        {
            TipoEmpresaEntity tipoEmpresa =
                new TipoEmpresaEntity();

            TipoEmpresaTableAdapter adapter =
                new TipoEmpresaTableAdapter();

            //Recorrer tabla por fila y crear objeto
            //con la información de la fila
            foreach (TipoEmpresaRow
                     fila in adapter.BuscarPorId(id))
            {
                tipoEmpresa
                    = new TipoEmpresaEntity(
                          fila.IdTipoEmpresa, fila.Descripcion);
            }

            return(tipoEmpresa);
        }
Esempio n. 6
0
        public List <TipoEmpresaEntity> BuscarTodo()
        {
            List <TipoEmpresaEntity> tiposE =
                new List <TipoEmpresaEntity>();

            TipoEmpresaTableAdapter adapter =
                new TipoEmpresaTableAdapter();

            //Recorrer tabla por fila y crear objeto
            //con la información de la fila
            foreach (TipoEmpresaRow
                     fila in adapter.GetData())
            {
                TipoEmpresaEntity tipo
                    = new TipoEmpresaEntity(
                          fila.IdTipoEmpresa, fila.Descripcion);
                tiposE.Add(tipo);
            }

            return(tiposE);
        }