protected void Button1_Click1(object sender, EventArgs e) { if (txtidem.Text == "" || txtfio.Text == "" || txtfin.Text == "" || txtdino.Text == "") { //que se muestre un mensaje que tiene que llenar todos los campos Response.Write("<script> alert(" + "'No deje campos en blanco'" + ") </script>"); } else { try { Servicio.Conexion cone = new Servicio.Conexion(); cone.crtdiames(Int32.Parse(txtidem.Text.ToString()), txtfio.Text.ToString(), txtfin.Text.ToString(), int.Parse(txtdino.Text.ToString())); Response.Write("<script> alert(" + "'Ingresado Correctamente'" + ") </script>"); txtidem.Text = ""; txtfio.Text = ""; txtfin.Text = ""; txtdino.Text = ""; } catch (Exception ex) { Response.Write("<script> alert(" + "'Error'" + ") </script>"); } } }
protected void Button1_Click1(object sender, EventArgs e) { if (txtdepa.Text == "" || txtpuesto.Text == "" || txtdesc.Text == "" || txtsal.Text == "") { //que se muestre un mensaje que tiene que llenar todos los campos Response.Write("<script> alert(" + "'No deje campos en blanco'" + ") </script>"); txtdepa.Text = ""; txtpuesto.Text = ""; txtdesc.Text = ""; txtsal.Text = ""; } else { Servicio.Conexion cone = new Servicio.Conexion(); try { cone.puesto(Int32.Parse(txtdepa.Text.ToString()), txtpuesto.Text.ToString(), txtdesc.Text.ToString(), Double.Parse(txtsal.Text.ToString())); Response.Write("<script> alert(" + "'Ingresado Correctamente'" + ") </script>"); } catch (Exception ex) { Response.Write("<script> alert(" + "'Error, verifique sus datos'" + ") </script>"); } } }
protected void Button1_Click1(object sender, EventArgs e) { if (txtemple.Text == "" || txtrol.Text == "" || txtcontra.Text == "" || txtesta.Text == "") { //que se muestre un mensaje que tiene que llenar todos los campos Response.Write("<script> alert(" + "'No deje campos en blanco'" + ") </script>"); } else { Servicio.Conexion cone = new Servicio.Conexion(); try { cone.nuevouser(Int32.Parse(txtemple.Text.ToString()), Int32.Parse(txtrol.Text.ToString()), Int32.Parse(txtcontra.Text.ToString()), Int32.Parse(txtesta.Text.ToString())); Response.Write("<script> alert(" + "'Ingresado correctamente'" + ") </script>"); txtemple.Text = ""; txtrol.Text = ""; txtcontra.Text = ""; txtesta.Text = ""; } catch (Exception) { Response.Write("<script> alert(" + "'Ha ocurrido un error, verifique sus datos'" + ") </script>"); } } }
protected void Button1_Click1(object sender, EventArgs e) { if (txtemple.Text == "" || txtfaper.Text == "" || txtfcier.Text == "" || txthore.Text == "" || txthe.Text == "") { //que se muestre un mensaje que tiene que llenar todos los campos Response.Write("<script> alert(" + "'No deje campos en blanco'" + ") </script>"); } else { try { Servicio.Conexion cone = new Servicio.Conexion(); cone.controlhorasmess(Int32.Parse(txtemple.Text.ToString()), txtfaper.Text.ToString(), txtfcier.Text.ToString(), Int32.Parse(txthore.Text.ToString()), Int32.Parse(txthe.Text.ToString())); Response.Write("<script> alert(" + "'Ingresado Correctamente'" + ") </script>"); txtemple.Text = ""; txtfaper.Text = ""; txtfcier.Text = ""; txthore.Text = ""; txthe.Text = ""; } catch (Exception ex) { Response.Write("<script> alert(" + "'Error, verifique sus datos '" + ") </script>"); } } }
protected void Button1_Click(object sender, EventArgs e) { if (txtcorreo.Text == "" || txtcontra.Text == "") { //que se muestre un mensaje que tiene que llenar todos los campos Response.Write("<script> alert(" + "'No deje campos en blanco'" + ") </script>"); } else { Servicio.Conexion con = new Servicio.Conexion(); int val = con.LOGIN(txtcorreo.Text.ToString(), Int32.Parse(txtcontra.Text.ToString())); if (val == 1) { Session["correo"] = txtcorreo.Text.ToString(); Server.Transfer("Inicio.aspx"); } else { Response.Write("<script> alert(" + "'Revise su correo o contraseña'" + ") </script>"); } } }
protected void Button1_Click1(object sender, EventArgs e) { if (txtemple.Text == "" || txtfechaini.Text == "" || txtcierre.Text == "") { //que se muestre un mensaje que tiene que llenar todos los campos Response.Write("<script> alert(" + "'No deje campos en blanco'" + ") </script>"); } else { try { Servicio.Conexion cone = new Servicio.Conexion(); cone.bono(Int32.Parse(txtemple.Text.ToString()), txtfechaini.Text.ToString(), txtcierre.Text.ToString()); Response.Write("<script> alert(" + "'ingresado'" + ") </script>"); txtemple.Text = ""; txtfechaini.Text = ""; txtcierre.Text = ""; } catch (Exception ex) { Response.Write("<script> alert(" + "'Error'" + ") </script>"); } } }