protected void LinkButton4_Click(object sender, EventArgs e) { List <Examenes> lst = new List <Examenes>(); lst = (List <Examenes>)ViewState["Examenes"]; String CuerpoExamen = ""; //= Recursos.CuerpoHtml; for (int i = 0; i < grdExam.Items.Count; i++) { String id = grdExam.DataKeys[i].Value.ToString(); int index = lst.FindIndex(x => x.accession_number.Equals(id)); CheckBox chk = (CheckBox)grdExam.Items[i].FindControl("chkCompartir"); if (chk.Checked) { lst[index].compartir = "True"; } } foreach (Examenes exam in lst) { if (exam.compartir.Equals("True")) { CuerpoExamen = CuerpoExamen + String.Format(Recursos.CuerpoHtml, exam.prestacion, exam.fecha_estudio, exam.compartir_estudio); } } Utilidades.Comunicacion comunicacion = new Utilidades.Comunicacion(); String html = String.Format(Recursos.HtmlExamenes, "", CuerpoExamen); comunicacion.sendEmailExam(html, txtCompartir.Text); }
protected void LinkButton4_Click(object sender, EventArgs e) { String CuerpoExamen = String.Format(Recursos.CuerpoHtml, lbNombreEstudio.Text, lbFechaEstudio.Text, (String)ViewState["urlComp"]); Utilidades.Comunicacion comunicacion = new Utilidades.Comunicacion(); String html = String.Format(Recursos.HtmlExamenes, "", CuerpoExamen); comunicacion.sendEmailExam(html, txtCompartir.Text); pnCompartir.Visible = false; }