protected void Button2_Click(object sender, EventArgs e) { try { DataTable table = null; table = Transaccion.DigitalizaReconstitucion(this.hddOT.Value.ToString(), "", this.Session["Usuario"].ToString()); if ((table != null) && (table.Rows.Count > 0)) { string idDocumento = table.Rows[0][0].ToString(); if (this.filesubir.PostedFile.ContentLength > 0) { string nomArchivo = ""; string path = base.Server.MapPath(@"~\DIGITALIZADOS"); nomArchivo = "DigiReconstitucion" + idDocumento.ToString() + Path.GetExtension(this.filesubir.PostedFile.FileName); string str4 = UTIL.SubirArchivo(this.filesubir, path, nomArchivo); if (!(str4 == "OK")) { this.Page.RegisterClientScriptBlock("Mensaje", "<script>alert('" + str4.ToString() + "');</script>"); } else if (!string.IsNullOrEmpty(nomArchivo)) { Transaccion.UpdateDigitalizadoReconstitucion(idDocumento, nomArchivo); this.Page.RegisterClientScriptBlock("Mensaje", "<script>alert('Documento digitalizado exitosamente');</script>"); this.CargaGrilla(); this.filesubir.Focus(); } } } } catch (Exception) { this.Page.RegisterClientScriptBlock("Mensaje", "<script>alert('Revise bien la informaci\x00f3n e intentelo de nuevo');</script>"); } }