protected void btnExpGuardar_Click(object sender, EventArgs e)
        {
            if (txtExpEmpresa.Text=="")
            {
                Response.Write("<script> alert('Ingrese una empresa.') </script>");
            }
            else if (txtExpTiempo.Text=="")
            {
                Response.Write("<script> alert('Ingrese el tiempo.') </script>");

            }
            else if (txtExpPuesto.Text=="")
            {
                Response.Write("<script> alert('Ingrese un puesto.') </script>");
            }
            else if (opc==false)
            {
                Response.Write("<script> alert('Primero se tiene que registrar el Extracto.') </script>");
            }
            else
            {
                ManejoDatos Experiencia = new ManejoDatos();
                try
                {
                    Experiencia.Experiencia(ID_CURRICULUM, txtExpEmpresa.Text, Convert.ToInt32(txtExpTiempo), txtExpPuesto.Text);
                }
                catch(Exception a)
                {
                    Response.Write("<script> alert('Ha ocurrido un error.') </script>");
                }

            }
        }
示例#2
0
        protected void btnExpGuardar_Click(object sender, EventArgs e)
        {
            ManejoDatos Experiencia = new ManejoDatos();
            int ID = (int)Session["UsuarioID"];
            int i = Experiencia.Busqueda("ID_CURRICULUM", "CURRICULUM", "ID_PERSONA", ID.ToString());
            if (txtExpEmpresa.Text == "")
            {
                Response.Write("<script> alert('Ingrese una empresa.') </script>");
            }
            else if (txtExpTiempo.Text == "")
            {
                Response.Write("<script> alert('Ingrese el tiempo.') </script>");

            }
            else if (txtExpPuesto.Text == "")
            {
                Response.Write("<script> alert('Ingrese un puesto.') </script>");
            }
            else if (i<1)
            {
                Response.Write("<script> alert('Primero se tiene que registrar el Extracto.') </script>");
            }
            else
            {
                try
                {
                    Experiencia.Experiencia(i, txtExpEmpresa.Text, Convert.ToInt32(txtExpTiempo.Text), txtExpPuesto.Text);
                    Response.Write("<script> alert('Se registro correctamente su experiencia.') </script>");
                }
                catch (Exception a)
                {
                    Response.Write("<script> alert('Ha ocurrido un error.') </script>");
                }
            }
        }