Example #1
0
 //Botón para registrar un nuevo tercero
 protected void botonRegistrarTercero_Click(object sender, EventArgs e)
 {
     if (txtNombre.Text != "" & txtApellido.Text != "" & txtNacimiento.Text != "" & ddlTipoDocumentoTercero.Text != "" & txtIdentificacion.Text != "" & ddlDepartamento.Text != "" & ddlCiudad.Text != "")
     {
         if (txtCelular.Text != "" | txtTelefono1.Text != "" | txtTelefono2.Text != "")
         {
             if (txtDireccion.Text != "" & ddlGeneroTercero.Text != "" & ddlEstadoCivilTercero.Text != "" & ddlOcupacionTercero.Text != "")
             {
                 string mensaje = AdministrarTercero.InsertarTercero(txtIdentificacion.Text, ddlTipoDocumentoTercero.SelectedValue, txtNombre.Text, txtApellido.Text, DateTime.Parse(txtNacimiento.Text), txtCorreo.Text, ddlGeneroTercero.SelectedValue, ddlDepartamento.SelectedValue, ddlCiudad.SelectedValue, txtCelular.Text, txtTelefono1.Text, txtDireccion.Text, txtTelefono2.Text, ddlOcupacionTercero.SelectedValue, ddlEstadoCivilTercero.SelectedValue, int.Parse(ddlHabeasData.SelectedValue));
                 ClientScript.RegisterStartupScript(GetType(), "alert", "alert('" + mensaje + "');", true);
                 bloquearCampos();
                 //ocultarBotones();
                 txtDocumento.Text = txtIdentificacion.Text;
                 buscarTercero(); //-
             }
             else
             {
                 ClientScript.RegisterStartupScript(GetType(), "alert", "alert('" + "FALTAN DATOS POR INGRESAR" + "');", true);
             }
         }
         else
         {
             ClientScript.RegisterStartupScript(GetType(), "alert", "alert('" + "FALTAN DATOS POR INGRESAR" + "');", true);
         }
     }
     else
     {
         ClientScript.RegisterStartupScript(GetType(), "alert", "alert('" + "FALTAN DATOS POR INGRESAR" + "');", true);
     }
 }
Example #2
0
 protected void btnInsertar_Click(object sender, EventArgs e)
 {
     AdministrarTercero.InsertarTercero(txtIdentificacion.Text, DBNull.Value.ToString(), txtNombre.Text, txtApellido.Text, DateTime.Today, txtCorreo.Text, DBNull.Value.ToString(), ddlDepartamento.SelectedValue, DBNull.Value.ToString(), txtCelular.Text, txtTelefono1.Text, txtDireccion.Text, txtTelefono2.Text, DBNull.Value.ToString(), DBNull.Value.ToString(), 0);
     //Response.Redirect("DevolucionDePrima2.aspx");
     Response.RedirectToRoute("devolucionPrimaTramitar");
 }