Пример #1
0
        private void insertarNuevo()
        {
            DialogResult result;
            Registros registro = new Registros();
            if(registro.insertarRegistroNuevo(this.textid.Text, this.textNombre.Text,
                                              this.textApellp.Text , this.textapellm.Text,
                                             this.textEstado.Text, this.textMunicipio.Text,
                                            this.textcolonia.Text, this.textCalle.Text,
                                           this.textNumExt.Text, this.textNumInt.Text,this.textCP.Text,
                                          this.textTelefono.Text, this.textCorreo.Text)){

                result = MessageBox.Show("Operacion realizada con exito");

                this.textid.Text = "";
                this.textNombre.Text = "";
                this.textApellp.Text = "";
                this.textapellm.Text = "";
                this.textEstado.Text = "";
                this.textMunicipio.Text = "";
                this.textcolonia.Text = "";
                this.textCalle.Text = "";
                this.textNumExt.Text = "";
                this.textNumInt.Text = "";
                this.textCP.Text = "";
                this.textTelefono.Text = "";
                this.textCorreo.Text = "";

            }
        }
        public ArrayList obtenerTodos()
        {
            this.abrirConexion();
            MySqlCommand myCommand = new MySqlCommand(this.querySelect(),
                                                      this.myConnection);
            MySqlDataReader myReader = myCommand.ExecuteReader();

            ArrayList personas = new ArrayList();

            while (myReader.Read())
            {
                Registros persona = new Registros();
                persona.id        = myReader["id"].ToString();
                persona.nombre    = myReader["Nombre"].ToString();
                persona.apellidoM = myReader["ApellidoM"].ToString();
                persona.apellidoP = myReader ["ApellidoP"].ToString();
                persona.telefono  = myReader ["Telefono"].ToString();
                personas.Add(persona);
            }

            myReader.Close();
            myReader = null;
            myCommand.Dispose();
            myCommand = null;
            this.cerrarConexion();
            return(personas);
        }
Пример #3
0
        private void insertarNuevo()
        {
            DialogResult result;
            Registros    registro = new Registros();

            if (registro.insertarRegistroNuevo(this.textid.Text, this.textNombre.Text,
                                               this.textApellp.Text, this.textapellm.Text,
                                               this.textEstado.Text, this.textMunicipio.Text,
                                               this.textcolonia.Text, this.textCalle.Text,
                                               this.textNumExt.Text, this.textNumInt.Text, this.textCP.Text,
                                               this.textTelefono.Text, this.textCorreo.Text))
            {
                result = MessageBox.Show("Operacion realizada con exito");

                this.textid.Text        = "";
                this.textNombre.Text    = "";
                this.textApellp.Text    = "";
                this.textapellm.Text    = "";
                this.textEstado.Text    = "";
                this.textMunicipio.Text = "";
                this.textcolonia.Text   = "";
                this.textCalle.Text     = "";
                this.textNumExt.Text    = "";
                this.textNumInt.Text    = "";
                this.textCP.Text        = "";
                this.textTelefono.Text  = "";
                this.textCorreo.Text    = "";
            }
        }
        public Registros obtenerPorId(string id)
        {
            this.abrirConexion();
            MySqlCommand myCommand = new MySqlCommand("SELECT * FROM Registros WHERE id = '"+id+"'",
                this.myConnection);
            MySqlDataReader myReader = myCommand.ExecuteReader();
            Registros  persona = new Registros();
            if(myReader.HasRows){
                myReader.Read();

                persona.id = myReader["id"].ToString();
                persona.nombre= myReader["Nombre"].ToString();
                persona.apellidoM = myReader["ApellidoM"].ToString();
                persona.apellidoP = myReader ["ApellidoP"].ToString ();
                persona.domicilio = myReader["Domicilio"].ToString();
                persona.cp = myReader ["CP"].ToString ();
                persona.municipio = myReader["Municipio"].ToString();
                persona.estado = myReader ["Estado"].ToString ();
                persona.pais = myReader["Pais"].ToString();
                persona.mapa = myReader ["Mapa"].ToString ();
                persona.telefono = myReader ["Telefono"].ToString ();
                persona.celular = myReader ["Celular"].ToString ();
                persona.radio = myReader ["Radio"].ToString ();
                persona.observaciones = myReader ["Observaciones"].ToString ();

            }
            myReader.Close();
            myReader = null;
            myCommand.Dispose();
            myCommand = null;
            this.cerrarConexion();
            return persona;
        }
        public Registros obtenerPorId(string id)
        {
            this.abrirConexion();
            MySqlCommand myCommand = new MySqlCommand("SELECT * FROM Registros WHERE id = '" + id + "'",
                                                      this.myConnection);
            MySqlDataReader myReader = myCommand.ExecuteReader();
            Registros       persona  = new Registros();

            if (myReader.HasRows)
            {
                myReader.Read();

                persona.id            = myReader["id"].ToString();
                persona.nombre        = myReader["Nombre"].ToString();
                persona.apellidoM     = myReader["ApellidoM"].ToString();
                persona.apellidoP     = myReader ["ApellidoP"].ToString();
                persona.domicilio     = myReader["Domicilio"].ToString();
                persona.cp            = myReader ["CP"].ToString();
                persona.municipio     = myReader["Municipio"].ToString();
                persona.estado        = myReader ["Estado"].ToString();
                persona.pais          = myReader["Pais"].ToString();
                persona.mapa          = myReader ["Mapa"].ToString();
                persona.telefono      = myReader ["Telefono"].ToString();
                persona.celular       = myReader ["Celular"].ToString();
                persona.radio         = myReader ["Radio"].ToString();
                persona.observaciones = myReader ["Observaciones"].ToString();
            }
            myReader.Close();
            myReader = null;
            myCommand.Dispose();
            myCommand = null;
            this.cerrarConexion();
            return(persona);
        }
Пример #6
0
 private void cargaAlumno()
 {
     AccionesDeRegistros acciones = new AccionesDeRegistros();
     this.Persona = acciones.obtenerPorId(this.id);
     if(this.Persona.id == ""){
         throw new Exception("El alumno no existe.");
     }
 }
 public bool insertarRegistroNuevo(Registros Persona, string Fecha)
 {
     this.abrirConexion();
     string sql = "INSERT INTO `Project`.`Registros` (`ApellidoP`, `ApellidoM`, `Nombre`, `Domicilio`, `CP`, `Municipio`, `Estado`, `Pais`, `Mapa`, `Telefono`, `Celular`, `Radio`,`Observaciones`,`saved_at` )" +
                  "VALUES ('"+Persona.apellidoP+"', '"+Persona.apellidoM+"', '"+Persona.nombre+"', '"+Persona.domicilio+"', '"+Persona.cp+"', '"+Persona.municipio+"', '"+Persona.estado+"', '"+Persona.pais+"', '"+Persona.mapa+"', '"+Persona.telefono+"', '"+Persona.celular+"', '"+Persona.radio+"', '"+Persona.observaciones+"','"+Fecha+"')";
     int afectadas = this.ejecutarComando(sql);
     this.cerrarConexion();
     return (afectadas>0);
 }
Пример #8
0
 void ButListoClick(object sender, EventArgs e)
 {
     DialogResult result;
     Registros registro = new Registros();
     if(registro.eliminarAgentePorId(this.textid.Text)){
        	result = MessageBox.Show("Operacion Realizada con exito..");
        	this.textid.Text ="";
        }
 }
Пример #9
0
        private void cargaAlumno()
        {
            AccionesDeRegistros acciones = new AccionesDeRegistros();

            this.Persona = acciones.obtenerPorId(this.id);
            if (this.Persona.id == "")
            {
                throw new Exception("El alumno no existe.");
            }
        }
        public bool insertarRegistroNuevo(Registros Persona, string Fecha)
        {
            this.abrirConexion();
            string sql = "INSERT INTO `Project`.`Registros` (`ApellidoP`, `ApellidoM`, `Nombre`, `Domicilio`, `CP`, `Municipio`, `Estado`, `Pais`, `Mapa`, `Telefono`, `Celular`, `Radio`,`Observaciones`,`saved_at` )" +
                         "VALUES ('" + Persona.apellidoP + "', '" + Persona.apellidoM + "', '" + Persona.nombre + "', '" + Persona.domicilio + "', '" + Persona.cp + "', '" + Persona.municipio + "', '" + Persona.estado + "', '" + Persona.pais + "', '" + Persona.mapa + "', '" + Persona.telefono + "', '" + Persona.celular + "', '" + Persona.radio + "', '" + Persona.observaciones + "','" + Fecha + "')";
            int afectadas = this.ejecutarComando(sql);

            this.cerrarConexion();
            return(afectadas > 0);
        }
Пример #11
0
        void ButListoClick(object sender, EventArgs e)
        {
            DialogResult result;
            Registros    registro = new Registros();

            if (registro.eliminarAgentePorId(this.textid.Text))
            {
                result           = MessageBox.Show("Operacion Realizada con exito..");
                this.textid.Text = "";
            }
        }
 public bool editarCodigoYNombreDeRegistro(Registros Persona, string fecha)
 {
     this.abrirConexion();
     string sql = "UPDATE `Project`.`Registros` SET `ApellidoP`='"+Persona.apellidoP+"', `ApellidoM`='"+Persona.apellidoM+"', " +
                  "`Nombre`='"+Persona.nombre+"', `Domicilio`='"+Persona.domicilio+"', `CP`='"+Persona.cp+"', `Municipio`='"+Persona.municipio+"', " +
                  "`Estado`='"+Persona.estado+"', `Pais`='"+Persona.pais+"', `Mapa`='"+Persona.mapa+"', `Telefono`='"+Persona.telefono+"', " +
                  "`Celular`='"+Persona.celular+"', `Radio`='"+Persona.radio+"',`Observaciones`= '"+Persona.observaciones+"',`modified_in`= '"+fecha+"'  WHERE `Id`='"+Persona.id+"'";
     int afectadas = this.ejecutarComando(sql);
     this.cerrarConexion();
     return (afectadas>0);
 }
        public bool editarCodigoYNombreDeRegistro(Registros Persona, string fecha)
        {
            this.abrirConexion();
            string sql = "UPDATE `Project`.`Registros` SET `ApellidoP`='" + Persona.apellidoP + "', `ApellidoM`='" + Persona.apellidoM + "', " +
                         "`Nombre`='" + Persona.nombre + "', `Domicilio`='" + Persona.domicilio + "', `CP`='" + Persona.cp + "', `Municipio`='" + Persona.municipio + "', " +
                         "`Estado`='" + Persona.estado + "', `Pais`='" + Persona.pais + "', `Mapa`='" + Persona.mapa + "', `Telefono`='" + Persona.telefono + "', " +
                         "`Celular`='" + Persona.celular + "', `Radio`='" + Persona.radio + "',`Observaciones`= '" + Persona.observaciones + "',`modified_in`= '" + fecha + "'  WHERE `Id`='" + Persona.id + "'";
            int afectadas = this.ejecutarComando(sql);

            this.cerrarConexion();
            return(afectadas > 0);
        }
Пример #14
0
        void ButEliminarClick(object sender, EventArgs e)
        {
            Registros registro = new Registros();
            DialogResult result;
            if(registro.eliminarPolizaPorId(this.textid.Text)){

                result = MessageBox.Show("Operacion realizada con exito....");

                this.textid.Text = "";

            }
        }
Пример #15
0
        void ButEliminarClick(object sender, EventArgs e)
        {
            Registros    registro = new Registros();
            DialogResult result;

            if (registro.eliminarPolizaPorId(this.textid.Text))
            {
                result = MessageBox.Show("Operacion realizada con exito....");

                this.textid.Text = "";
            }
        }
Пример #16
0
 public void registros_crear_mostrar()
 {
     if (registros == null)
     {
         registros             = new Registros();
         registros.FormClosed += (o, ea) => registros = null;
     }
     else
     {
         registros.WindowState = FormWindowState.Normal;
         registros.Focus();
     }
     registros.Tag = this;
     registros.Show();
 }
Пример #17
0
        public void insertarNuevo()
        {
            DialogResult result;
            Registros    registro = new Registros();

            if (registro.insertarRegistroPoliza(this.textid.Text, this.textidAgente.Text,
                                                this.textidCompania.Text, this.textidCliente.Text,
                                                this.textNombre.Text, this.textApell_p.Text,
                                                this.textApell_m.Text, this.textCalle.Text,
                                                this.textColonia.Text, this.textNumExt.Text,
                                                this.textNumInt.Text, this.textMunicipio.Text,
                                                this.textEstado.Text, this.textTelefono.Text,
                                                this.textCP.Text, this.textRFC.Text,
                                                this.textCorreo.Text, this.textMarca.Text, this.textTipo.Text,
                                                this.textModelo.Text, this.textSerie.Text,
                                                this.textplacas.Text, this.textCovertura.Text,
                                                this.textNombreCompania.Text, this.textClavevehiculo.Text))
            {
                result = MessageBox.Show("Operacion Realizada con exito");

                this.textid.Text             = "";
                this.textidCliente.Text      = "";
                this.textidCompania.Text     = "";
                this.textidAgente.Text       = "";
                this.textNombre.Text         = "";
                this.textApell_p.Text        = "";
                this.textApell_m.Text        = "";
                this.textCalle.Text          = "";
                this.textColonia.Text        = "";
                this.textNumExt.Text         = "";
                this.textNumInt.Text         = "";
                this.textMunicipio.Text      = "";
                this.textEstado.Text         = "";
                this.textTelefono.Text       = "";
                this.textCP.Text             = "";
                this.textRFC.Text            = "";
                this.textCorreo.Text         = "";
                this.textMarca.Text          = "";
                this.textTipo.Text           = "";
                this.textModelo.Text         = "";
                this.textSerie.Text          = "";
                this.textplacas.Text         = "";
                this.textCovertura.Text      = "";
                this.textNombreCompania.Text = "";
                this.textClavevehiculo.Text  = "";
            }
        }
Пример #18
0
        public void insertarNuevo()
        {
            DialogResult result;
            Registros registro = new Registros();
            if(registro.insertarRegistroPoliza(this.textid.Text, this.textidAgente.Text,
                                               this.textidCompania.Text, this.textidCliente.Text,
                                               this.textNombre.Text, this.textApell_p.Text,
                                               this.textApell_m.Text, this.textCalle.Text,
                                               this.textColonia.Text, this.textNumExt.Text,
                                               this.textNumInt.Text,this.textMunicipio.Text,
                                               this.textEstado.Text, this.textTelefono.Text,
                                               this.textCP.Text, this.textRFC.Text,
                                               this.textCorreo.Text,this.textMarca.Text,this.textTipo.Text,
                                               this.textModelo.Text, this.textSerie.Text,
                                               this.textplacas.Text, this.textCovertura.Text,
                                               this.textNombreCompania.Text, this.textClavevehiculo.Text)){

                result = MessageBox.Show("Operacion Realizada con exito");

                this.textid.Text = "";
                this.textidCliente.Text = "";
                this.textidCompania.Text = "";
                this.textidAgente.Text = "";
                this.textNombre.Text = "";
                this.textApell_p.Text = "";
                this.textApell_m.Text = "";
                this.textCalle.Text = "";
                this.textColonia.Text = "";
                this.textNumExt.Text = "";
                this.textNumInt.Text = "";
                this.textMunicipio.Text = "";
                this.textEstado.Text ="";
                this.textTelefono.Text = "";
                this.textCP.Text = "";
                this.textRFC.Text = "";
                this.textCorreo.Text = "";
                this.textMarca.Text = "";
                this.textTipo.Text = "";
                this.textModelo.Text = "";
                this.textSerie.Text = "";
                this.textplacas.Text = "";
                this.textCovertura.Text = "";
                this.textNombreCompania.Text ="";
                this.textClavevehiculo.Text = "";

            }
        }
Пример #19
0
        private void insertarNuevo()
        {
            DialogResult result;
            Registros registro = new Registros();
            if(registro.insertarRegistroAgente(this.textid.Text, this.textNombre.Text,
                                               this.textApellp.Text, this.textApellm.Text,
                                               this.textTelefono.Text, this.textCorreo.Text)){

                result = MessageBox.Show("Operacion realizada con exito..");

                this.textid.Text = "";
                this.textNombre.Text = "";
                this.textApellp.Text = "";
                this.textApellm.Text = "";
                this.textTelefono.Text = "";
                this.textCorreo.Text = "";
            }
        }
Пример #20
0
        private void  insertarNuevo()
        {
            DialogResult result;
            Registros    registro = new Registros();

            if (registro.insertarRegistroAgente(this.textid.Text, this.textNombre.Text,
                                                this.textApellp.Text, this.textApellm.Text,
                                                this.textTelefono.Text, this.textCorreo.Text))
            {
                result = MessageBox.Show("Operacion realizada con exito..");

                this.textid.Text       = "";
                this.textNombre.Text   = "";
                this.textApellp.Text   = "";
                this.textApellm.Text   = "";
                this.textTelefono.Text = "";
                this.textCorreo.Text   = "";
            }
        }
Пример #21
0
        private void insertarNuevo()
        {
            DialogResult result;
            Registros registro = new Registros();
            if(registro.insertarRegistroCompanias(this.textid.Text, this.textNombre.Text,
                                                  this.textTelefono.Text, this.textCorreo.Text,
                                                 this.textTipoSeguro.Text, this.textCovertura.Text,
                                                this.textPrecio.Text)){
                result = MessageBox.Show("Operacion realizada con exito..");

                this.textid.Text = "";
                this.textNombre.Text ="";
                this.textTelefono.Text ="";
                this.textCorreo.Text = "";
                this.textTipoSeguro.Text = "";
                this.textCovertura.Text = "";
                this.textPrecio.Text = "";

            }
        }
Пример #22
0
        private void insertarNuevo()
        {
            DialogResult result;
            Registros    registro = new Registros();

            if (registro.insertarRegistroCompanias(this.textid.Text, this.textNombre.Text,
                                                   this.textTelefono.Text, this.textCorreo.Text,
                                                   this.textTipoSeguro.Text, this.textCovertura.Text,
                                                   this.textPrecio.Text))
            {
                result = MessageBox.Show("Operacion realizada con exito..");

                this.textid.Text         = "";
                this.textNombre.Text     = "";
                this.textTelefono.Text   = "";
                this.textCorreo.Text     = "";
                this.textTipoSeguro.Text = "";
                this.textCovertura.Text  = "";
                this.textPrecio.Text     = "";
            }
        }
Пример #23
0
        private void mostrardatos()
        {
            Registros registro = new Registros();
            registro  reg      = registro.obtenerPorid(this.textidCliente.Text);

            if (reg.id != "")
            {
                this.textNombre.Text    = reg.Nombre;
                this.textApell_p.Text   = reg.Apell_P;
                this.textApell_m.Text   = reg.Apell_M;
                this.textEstado.Text    = reg.Estado;
                this.textMunicipio.Text = reg.Municipio;
                this.textColonia.Text   = reg.Colonia;
                this.textCalle.Text     = reg.Calle;
                this.textNumExt.Text    = reg.NumExt;
                this.textNumInt.Text    = reg.NumInt;
                this.textCP.Text        = reg.CP;
                this.textTelefono.Text  = reg.Telefono;
                this.textCorreo.Text    = reg.Correo;
                this.textRFC.Text       = reg.RFC;
            }
        }
Пример #24
0
 private void opciones(Registros registros)
 {
     this.boton ("btnVer_" + registros.id, "Ver", "gtk-Ver");
     this.x += 50;
     this.boton("btnEditar_" + registros.id, "Editar", "gtk-edit");
     this.x += 70;
     this.boton("btnEliminar_" + registros.id, "Eliminar", "gtk-delete");
     this.x += 80;
     this.boton("btnEnviar_"+ registros.id, "Mail", "gtk-mail");
 }
        public ArrayList obtenerTodos()
        {
            this.abrirConexion();
            MySqlCommand myCommand = new MySqlCommand(this.querySelect(),
                this.myConnection);
            MySqlDataReader myReader = myCommand.ExecuteReader();

            ArrayList personas = new ArrayList();
            while (myReader.Read()){
                Registros persona = new Registros();
                persona.id = myReader["id"].ToString();
                persona.nombre= myReader["Nombre"].ToString();
                persona.apellidoM = myReader["ApellidoM"].ToString();
                persona.apellidoP = myReader ["ApellidoP"].ToString ();
                persona.telefono = myReader ["Telefono"].ToString ();
                personas.Add(persona);
            }

            myReader.Close();
            myReader = null;
            myCommand.Dispose();
            myCommand = null;
            this.cerrarConexion();
            return personas;
        }
Пример #26
0
        private void insertarNuevo()
        {
            if (!this.validarNoVacio())
            {
                MessageDialog md = new MessageDialog(
                    null,
                    DialogFlags.Modal,
                    MessageType.Error,
                    ButtonsType.None, "Ocurrio un error: " + "Campos vacios"
                    );
                md.Show();
            }
            else
            {
                AccionesDeRegistros acciones = new AccionesDeRegistros();
                Registros           Persona  = new Registros();

                Persona.apellidoP     = txtApellidoP.Text;
                Persona.apellidoM     = txtApellidoM.Text;
                Persona.nombre        = txtNombre.Text;
                Persona.domicilio     = txtDomicilio.Text;
                Persona.cp            = txtCp.Text;
                Persona.municipio     = txtMun.Text;
                Persona.estado        = txtEst.Text;
                Persona.pais          = txtPais.ActiveText.ToString();
                Persona.mapa          = txtMail.Text;
                Persona.telefono      = txtTel1.Text;
                Persona.celular       = txtCelular.Text;
                Persona.radio         = txtRadio.Text;
                Persona.observaciones = txtObs.Text;

                if (acciones.insertarRegistroNuevo(Persona, DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")))
                {
                    MessageDialog md = new MessageDialog(null,
                                                         DialogFlags.Modal,
                                                         MessageType.Info,
                                                         ButtonsType.None, "Acción realizada con exito.");
                    md.Show();
                    this.txtNombre.Text    = "";
                    this.txtApellidoM.Text = "";
                    this.txtApellidoP.Text = "";
                    this.txtDomicilio.Text = "";
                    this.txtCp.Text        = "";
                    this.txtMail.Text      = "";
                    this.txtMun.Text       = "";
                    this.txtEst.Text       = "";
                    this.txtTel1.Text      = "";
                    this.txtCelular.Text   = "";
                    this.txtRadio.Text     = "";
                    this.txtObs.Text       = "";

                    this.padre.tabla();
                }
                else
                {
                    MessageDialog md = new MessageDialog(
                        null,
                        DialogFlags.Modal,
                        MessageType.Error,
                        ButtonsType.None, "Ocurrio un error: "
                        );
                    md.Show();
                }
            }
        }
Пример #27
0
 private void registro(Registros registro)
 {
     this.etiqueta("lblID_" + registro.id, "<span size=\"12000\" foreground=\"#000000\">" + registro.id + "</span>");
     this.x += 100;
     this.etiqueta("lblCodigo_" + registro.id, "<span size=\"12000\" foreground=\"#000000\">" + registro.nombre+" "+ registro.apellidoM + " "+ registro.apellidoP+ "</span>");
     this.x += 170;
     this.etiqueta("lblNombre_" + registro.id, "<span size=\"12000\" foreground=\"#000000\">" + registro.telefono+"</span>");
     this.x += 200;
     this.opciones(registro);
 }
Пример #28
0
        private void mostrardatos()
        {
            Registros registro = new Registros();
            registro reg=registro.obtenerPorid(this.textidCliente.Text);

            if(reg.id!=""){

                this.textNombre.Text = reg.Nombre;
                this.textApell_p.Text = reg.Apell_P;
                this.textApell_m.Text = reg.Apell_M;
                this.textEstado.Text = reg.Estado;
                this.textMunicipio.Text = reg.Municipio;
                this.textColonia.Text = reg.Colonia;
                this.textCalle.Text = reg.Calle;
                this.textNumExt.Text = reg.NumExt;
                this.textNumInt.Text = reg.NumInt;
                this.textCP.Text = reg.CP;
                this.textTelefono.Text = reg.Telefono;
                this.textCorreo.Text = reg.Correo;
                this.textRFC.Text = reg.RFC;

            }
        }
Пример #29
0
        private void insertarNuevo()
        {
            if (!this.validarNoVacio ()) {

                MessageDialog md = new MessageDialog (
                    null,
                    DialogFlags.Modal,
                    MessageType.Error,
                    ButtonsType.None, "Ocurrio un error: " + "Campos vacios"
                );
                md.Show ();
            } else {
                AccionesDeRegistros acciones = new AccionesDeRegistros ();
                Registros Persona = new Registros ();

                Persona.apellidoP = txtApellidoP.Text;
                Persona.apellidoM = txtApellidoM.Text;
                Persona.nombre = txtNombre.Text;
                Persona.domicilio = txtDomicilio.Text;
                Persona.cp = txtCp.Text;
                Persona.municipio = txtMun.Text;
                Persona.estado = txtEst.Text;
                Persona.pais = txtPais.ActiveText.ToString ();
                Persona.mapa = txtMail.Text;
                Persona.telefono = txtTel1.Text;
                Persona.celular = txtCelular.Text;
                Persona.radio = txtRadio.Text;
                Persona.observaciones = txtObs.Text;

                if (acciones.insertarRegistroNuevo (Persona, DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"))) {
                    MessageDialog md = new MessageDialog (null,
                        DialogFlags.Modal,
                        MessageType.Info,
                        ButtonsType.None, "Acción realizada con exito.");
                    md.Show ();
                    this.txtNombre.Text = "";
                    this.txtApellidoM.Text = "";
                    this.txtApellidoP.Text = "";
                    this.txtDomicilio.Text = "";
                    this.txtCp.Text = "";
                    this.txtMail.Text = "";
                    this.txtMun.Text= "";
                    this.txtEst.Text = "";
                    this.txtTel1.Text= "";
                    this.txtCelular.Text= "";
                    this.txtRadio.Text= "";
                    this.txtObs.Text= "";

                    this.padre.tabla ();
                } else {
                    MessageDialog md = new MessageDialog (
                        null,
                        DialogFlags.Modal,
                        MessageType.Error,
                        ButtonsType.None, "Ocurrio un error: "
                    );
                    md.Show ();

                }
            }
        }