private bool Ingresar()
        {
            PostgresDataAccess.Expediente exp = new PostgresDataAccess.Expediente();
            bool res;

            // agregar datos
            exp.Activo          = true;
            exp.Block           = textBlock.Text;
            exp.Casa            = textCasa.Text;
            exp.Cero5           = /*textDireccion.Text + " / " + */ TextoFormateado(textEsquina.Text);
            exp.Compania        = comboCompañia.SelectedItem == null ? "" : comboCompañia.SelectedItem.ToString();
            exp.Comuna          = comboComuna.SelectedItem == null ? "" : comboComuna.SelectedItem.ToString();
            exp.Descripcion     = textDescripcion.Text;
            exp.Fecha           = dtFecha.Value;
            exp.Hora            = DateTime.Parse(textHora.Text);
            exp.Poblacion_villa = textPoblacion.Text;
            exp.Quien_llama     = textQuienLlama.Text;
            exp.Seis2           = TextoFormateado(textDireccion.Text);
            //exp.Servicio = comboServicio.SelectedItem == null ? "" : comboServicio.SelectedItem.ToString();
            exp.Codigo_llamado   = (int)textClave.Tag;
            exp.Codigo_principal = exp.Codigo_llamado < 100 ? exp.Codigo_llamado : (exp.Codigo_llamado - (exp.Codigo_llamado % 100)) / 100;
            exp.Telefono         = textTelefono.Text;
            if (edicion)
            {
                exp.Ubicacion = EditExp.Ubicacion;
                exp.Geoz      = EditExp.Geoz;
                exp.Id_area   = EditExp.Id_area;
            }
            else
            {
                exp.Ubicacion = PlugData.Direccion.Ubicacion.Value;
                exp.Geoz      = Datos.ObtenerGeoz(exp.Ubicacion.ToString());
                exp.Id_area   = Datos.ObtenerArea(exp.Ubicacion.ToString());
            }

            this.UseWaitCursor = true;
            if (edicion)
            {
                exp.Id_expediente = EditExp.Id_expediente;
                res = Datos.ActualizarExpediente(exp);
            }
            else
            {
                res = Datos.InsertarExpediente(exp);
            }
            this.UseWaitCursor = false;

            return(res);

            /*else
             * {
             *  this.Close();
             * }*/
        }