private void ActualizarInforme() { VerifDomComercialApp oVerifDom = new VerifDomComercialApp(); bool cargar = oVerifDom.cargarVerifDomComercial(int.Parse(idInforme.Value)); // Usuario Logueado UsuarioAutenticado Usuario = (UsuarioAutenticado)Session["UsuarioAutenticado"]; oVerifDom.IdCliente = Usuario.IdCliente; oVerifDom.IdUsuario = Usuario.IdUsuario; oVerifDom.IdTipoPersona = int.Parse(idTipoPersona.Value); oVerifDom.IdInforme = int.Parse(idInforme.Value); oVerifDom.Nombre = txtNombre.Text; oVerifDom.Apellido = txtApellido.Text; oVerifDom.TipoDocumento = int.Parse(cmbTipoDocumento.SelectedItem.Value); oVerifDom.Documento = txtDocumento.Text; if (int.Parse(idTipoPersona.Value) == 1) { oVerifDom.NombreFantasia = NombreFantasiaPers.Text; oVerifDom.RazonSocial = RazonSocialPers.Text; oVerifDom.Rubro = RubroPers.Text; oVerifDom.Cuit = CuitPers.Text; } else { oVerifDom.NombreFantasia = NombreFantasia.Text; oVerifDom.RazonSocial = RazonSocial.Text; oVerifDom.Rubro = Rubro.Text; oVerifDom.Cuit = Cuit.Text; } oVerifDom.Calle = txtCalle.Text; oVerifDom.Barrio = txtBarrio.Text; oVerifDom.Nro = txtNro.Text; oVerifDom.Piso = txtPiso.Text; oVerifDom.Depto = txtDepto.Text; oVerifDom.CP = txtCP.Text; oVerifDom.Telefono = txtTelefono.Text; oVerifDom.IdProvincia = int.Parse(cmbProvincia.SelectedValue); oVerifDom.IdLocalidad = int.Parse(cmbLocalidad.SelectedValue); //EMPRESA oVerifDom.TelefonoEmpresa = Telefono.Text; oVerifDom.CalleEmpresa = CalleEmpresa.Text; oVerifDom.NroEmpresa = NroEmpresa.Text; oVerifDom.DptoEmpresa = DptoEmpresa.Text; oVerifDom.PisoEmpresa = PisoEmpresa.Text; oVerifDom.BarrioEmpresa = BarrioEmpresa.Text; oVerifDom.CPEmpresa = CPEmpresa.Text; if (oVerifDom.IdTipoPersona == 2) { oVerifDom.ProvinciaEmpresa = int.Parse(cmbProvinciaEmpresas.SelectedValue); oVerifDom.LocalidadEmpresa = int.Parse(cmbLocalidadEmpresas.SelectedValue); } oVerifDom.Fecha = txtFecha.Text; oVerifDom.Ocupacion = txtOcupacion.Text; oVerifDom.Categoria = txtCategoria.Text; oVerifDom.MovComercial = txtMovComercial.Text; oVerifDom.Actividad = txtActividad.Text; oVerifDom.RubrosAdicionales = txtRubros.Text; oVerifDom.Horario = txtHorario.Text; oVerifDom.Antiguedad = txtAntiguedad.Text; oVerifDom.CantPersonal = txtCantPersonal.Text; if (raCaractZona.SelectedItem != null) { oVerifDom.CaractZona = int.Parse(raCaractZona.SelectedItem.Value); } if (raDocumentoVerificado.SelectedItem != null) { oVerifDom.DocVerificado = int.Parse(raDocumentoVerificado.SelectedItem.Value); } if (raUbicacion.SelectedItem != null) { oVerifDom.Ubicacion = int.Parse(raUbicacion.SelectedItem.Value); } if (raTamanio.SelectedItem != null) { oVerifDom.TamLocal = int.Parse(raTamanio.SelectedItem.Value); } if (raInmueble.SelectedItem != null) { oVerifDom.Inmueble = int.Parse(raInmueble.SelectedItem.Value); } if (raEstado.SelectedItem != null) { oVerifDom.Estado = int.Parse(raEstado.SelectedItem.Value); } oVerifDom.Publicidad = (chkPubicidad.Checked) ? 1:0; oVerifDom.Vigilancia = (chkVigilancia.Checked) ? 1:0; oVerifDom.FechaInicio = txtInicio.Text; oVerifDom.CatIVA = txtCategoriaIVA.Text; oVerifDom.Informo = txtInformo.Text; oVerifDom.Cargo = txtCargo.Text; oVerifDom.NombreVecino = txtNombreVecino.Text; oVerifDom.DomicilioVecino = txtDomicilioVecino.Text; oVerifDom.ConoceVecino = txtConoceVecino.Text; oVerifDom.Observaciones = txtObservaciones.Text; oVerifDom.PlanoA = txtPlanoA.Text; oVerifDom.PlanoB = txtPlanoB.Text; oVerifDom.PlanoC = txtPlanoC.Text; oVerifDom.PlanoD = txtPlanoD.Text; oVerifDom.ConFoto = ((bool)ViewState["ConFoto"])? 1: 0; if (int.Parse(idReferencia.Value) == 0) { oVerifDom.Crear(); } else { oVerifDom.Modificar(int.Parse(idInforme.Value)); } if (oVerifDom.IdTipoPersona == 1) { PersonasAPP persona = new PersonasAPP(); persona.Nombre = txtNombre.Text; persona.Apellido = txtApellido.Text; persona.TipoDocumento = int.Parse(cmbTipoDocumento.SelectedItem.Value); persona.Documento = txtDocumento.Text; bool resultado = persona.Crear(); } }