Exemple #1
0
        private void botonExportar_Click(object sender, EventArgs e)
        {
            List <ProductoDTO> productos = new List <ProductoDTO>();

            foreach (DataGridViewRow row in dataGridView1.Rows)
            {
                productos.Add(RowAProductoDTO(row));
            }
            GenPdf.PDFProductos(productos);
        }
        private void button1_Click(object sender, EventArgs e)
        {
            ICollection <ClienteDTO> clientes = new List <ClienteDTO>();

            foreach (DataGridViewRow row in dataGridView1.Rows)
            {
                clientes.Add(RowAClienteDTO(row));
            }
            GenPdf.PDFClientes(clientes);
        }
Exemple #3
0
        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());
        }
Exemple #4
0
        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());
        }
Exemple #6
0
        //[TestMethod]
        public void TestGenPdfPresupuesto()
        {
            var repo = new Repositorio();

            GenPdf.PDFPresupuesto(repo.Presupuestos.Find(1));
        }
        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();
        }