Esempio n. 1
0
        public bool Create()
        {
            try
            {
                DALC.Clientes clientes = new DALC.Clientes();
                clientes.RutEmpresa           = this.RutEmpresa;
                clientes.RazonSocial          = this.RazonSocial;
                clientes.Giro                 = this.Giro;
                clientes.Direccion            = this.Direccion;
                clientes.TelefonoContacto     = this.TelefonoContacto;
                clientes.IdTipoPago           = this.IdTipoPago;
                clientes.IdContactoComercial  = this.IdContactoComercial;
                clientes.Condicion            = this.Condicion;
                clientes.LineaDeCredito       = this.LineaCredito;
                clientes.Dicom                = this.Dicom;
                clientes.Observacion          = this.Observacion;
                clientes.FechaDeActualizacion = this.FechaActualizacion;
                clientes.FechaIngreso         = this.FechaIngreso;
                clientes.IdCiudad             = this.IdCiudad;
                clientes.IdComuna             = this.IdComuna;

                db.Clientes.Add(clientes);

                db.SaveChanges();

                return(true);
            }
            catch (Exception)
            {
                return(false);
            }
        }
Esempio n. 2
0
        public bool Create()
        {
            try
            {
                DALC.ContactosComerciales contactosComerciales = new ContactosComerciales();

                contactosComerciales.NombreContacto = this.NombreConta;
                contactosComerciales.Telefono       = this.Telefono;
                contactosComerciales.Email          = this.Email;
                contactosComerciales.IdCargo        = contactosComerciales.IdCargo;

                db.ContactosComerciales.Add(contactosComerciales);
                db.SaveChanges();

                return(true);
            }
            catch (Exception)
            {
                return(false);
            }
        }