public byte[] GetPdf() { // List<Invitee> lstInvitee = new List<Invitee>(); // InviteeRepository invRepos = new InviteeRepository(); List <Invitee> invList = new List <Invitee>(); List <int> lstIDInt = new List <int>(); const string PATH = "~/PDF/"; GenPdf genpdf = new GenPdf(Server.MapPath(PATH)); string formname = chkFrench.Checked ? "Invitation Letter_French_Form Fields.pdf" : "Invitation Letter_English_Form Fields.pdf"; //foreach (string id in Request.QueryString["physlst"].Split(",".ToCharArray()).ToList()) //{ // lstIDInt.Add(Int32.Parse(physicianID)); //} lstIDInt.Add(physicianID); invList = invRepos.GetInviteeData(lstIDInt); genpdf.Create(); foreach (Invitee inv in invList) //loop by physician { //f1 genpdf.AddForm(formname); //string nameA = doc.LastName + ", "; string fullName = string.Empty; if (inv.Salutation != null) { fullName = Utility.GetStrippedSalutation(inv.Salutation) + " " + inv.FirstName + " " + inv.LastName; } else { fullName = inv.FirstName + " " + inv.LastName; } genpdf.AddField("UniqueID", inv.RegistrationCode, 0); genpdf.AddField("Salutation FNAME LNAME", fullName, 0); genpdf.AddField("Salutation FNAME LNAME", fullName, 0); // genpdf.Save(); genpdf.FinalizeForm(true); } return(genpdf.Close()); }
public byte[] GetPdf() { // List<Invitee> lstInvitee = new List<Invitee>(); // InviteeRepository invRepos = new InviteeRepository(); List <Invitee> invList = new List <Invitee>(); List <int> lstIDInt = new List <int>(); const string PATH = "~/PDF/"; GenPdf genpdf = new GenPdf(Server.MapPath(PATH)); string formname = chkFrench.Checked ? "VISTA DM_Invitation_PCP_FR.pdf" : "VISTA DM_Invitation_PCP.pdf"; //string formname = "vista invite template.pdf"; //foreach (string id in Request.QueryString["physlst"].Split(",".ToCharArray()).ToList()) //{ // lstIDInt.Add(Int32.Parse(physicianID)); //} lstIDInt.Add(physicianID); invList = invRepos.GetInviteeData(lstIDInt); genpdf.Create(); foreach (Invitee inv in invList) //loop by physician { //f1 genpdf.AddForm(formname); //string nameA = doc.LastName + ", "; string fullName = string.Empty; fullName = inv.FirstName + " " + inv.LastName; genpdf.AddField("Unique ID", inv.RegistrationCode, 0); genpdf.AddField("LName", inv.LastName, 0); //genpdf.AddField("UNIQUEID", inv.RegistrationCode, 0); //genpdf.AddField("Salutation FNAME LNAME", fullName, 0); //genpdf.AddField("Salutation FNAME LNAME", fullName, 0); // genpdf.Save(); genpdf.FinalizeForm(true); } return(genpdf.Close()); }
public byte[] getPracticePdf() { List <Invitee> lstInvitee = new List <Invitee>(); InviteeRepository invRepos = new InviteeRepository(); GenPdf genpdf = new GenPdf(Server.MapPath(PATH)); List <Invitee> invList = new List <Invitee>(); List <int> lstIDInt = new List <int>(); foreach (string id in Request.QueryString["physlst"].Split(",".ToCharArray()).ToList()) { lstIDInt.Add(Int32.Parse(id)); } invList = invRepos.GetInviteeData(lstIDInt); genpdf.Create(); foreach (Invitee inv in invList) //loop by physician { //f1 genpdf.AddForm(formname); //string nameA = doc.LastName + ", "; string fullName = inv.FirstName + " " + inv.LastName; //if (inv.Salutation != null) // fullName = Utility.GetStrippedSalutation(inv.Salutation) + " " + inv.FirstName + " " + inv.LastName; //else // fullName = inv.FirstName + " " + inv.LastName; genpdf.AddField("Unique ID", inv.RegistrationCode, 0); genpdf.AddField("LName", inv.LastName, 0); //genpdf.AddField("Salutation FNAME LNAME", fullName, 0); // genpdf.Save(); genpdf.FinalizeForm(true); } return(genpdf.Close()); }
public byte[] getPracticePdf() { List <Invitee> lstInvitee = new List <Invitee>(); InviteeRepository invRepos = new InviteeRepository(); GenPdf genpdf = new GenPdf(Server.MapPath(PATH)); List <Invitee> invList = new List <Invitee>(); List <int> lstIDInt = new List <int>(); foreach (string id in Request.QueryString["physlst"].Split(",".ToCharArray()).ToList()) { lstIDInt.Add(Int32.Parse(id)); } invList = invRepos.GetInviteeData(lstIDInt); genpdf.Create(); foreach (Invitee inv in invList) //loop by physician { //f1 genpdf.AddForm(formname); //string nameA = doc.LastName + ", "; string fullName = string.Empty; if (inv.Salutation != null) { fullName = Utility.GetStrippedSalutation(inv.Salutation) + " " + inv.FirstName + " " + inv.LastName; } else { fullName = inv.FirstName + " " + inv.LastName; } genpdf.AddField("UniqueID", inv.RegistrationCode, 0); genpdf.AddField("Salutation FNAME LNAME", fullName, 0); genpdf.AddField("Salutation FNAME LNAME", fullName, 0); // genpdf.Save(); genpdf.FinalizeForm(true); } return(genpdf.Close()); //GenPdf genpdf = new GenPdf(Server.MapPath(PATH)); //List<Physician> doclist = new List<Physician>(); //genpdf.Create(); //string idlst = Request.QueryString["physlst"]; //string[] idarr = idlst.Split(",".ToCharArray()); //doclist = Physician.GetPhysicianList(idarr); //foreach (Physician doc in doclist) //loop by physician //{ //f1 // genpdf.AddForm(formname); // //string nameA = doc.LastName + ", "; // //string nameB = nameA; // string id = doc.PhysicianID; // string regid = doc.PhysicianID; // string name = doc.FirstName + " " + doc.LastName + ","; // //genpdf.AddField("Last Name", nameA, 0); // genpdf.AddField("name", name, 0); // genpdf.AddField("id", id, 0); // genpdf.AddField("regid", regid, 0); // // genpdf.Save(); // genpdf.FinalizeForm(true); //} //return genpdf.Close(); }