Example #1
0
 protected void Buttonguarimpri_Click(object sender, EventArgs e)
 {
     try
     {
         Terceros ter       = (Terceros)Session["tercero"];
         DataRow  datcont   = Validar.Consulta(terc.ConsultarPersonaIdenti(texboxdni.Text)).Rows[0];
         string   ipprivada = GetLocalIPAddress();
         string   ippublica = GetPublicIPAddress();
         eg.observacion            = Validar.validarlleno(TextBox2.Text).ToUpper();
         eg.valoregreso            = Validar.validarlleno(TextBox3.Text);
         eg.motivo_idtercero_egre  = Validar.validarselected(DropDownList2.SelectedValue);
         eg.tercero_idtercero_egre = datcont["idterceros"].ToString();
         eg.tercero_idtercero_reg  = ter.idterceros;
         eg.Registraregreso(ter.identificacion + ": " + ter.nombre + " " + ter.apellido, GetLocalIPAddress() + "-" + Dns.GetHostName() + "-" + GetPublicIPAddress());
         imprimir();
         string guardar = "SI";
         Response.Redirect("pagegresos.aspx?key=" + guardar);
     }
     catch (Exception)
     {
         ScriptManager.RegisterStartupScript(this, this.GetType(), "hwa", " errorsoft();", true);
     }
 }