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());
        }
Beispiel #2
0
        protected void btnRegister_clicked(object sender, System.EventArgs e)
        {
            userRepos    = new UserRepository();
            inviteeRepos = new InviteeRepository();

            string regCode      = txtRegCode.Text;
            string redirect_url = string.Format("~/Account/PhysicianRegistration.aspx?{0}={1}", Constants.REGISTARTION_CODE, regCode);


            if (!userRepos.IsValidRegistrationCode(regCode))
            {
                lblRegResult.Text = "Registration Code is invalid";
                return;
            }


            if (inviteeRepos.PhysicianLimitReached(regCode))
            {
                //lblRegResult.Text = "Registration Limit Reached";

                ScriptManager.RegisterStartupScript
                (
                    this,
                    typeof(Page),
                    "POPUP_INVALID_REG",
                    "window.open('userLimitReached.htm', 'userLimitReached', 'width=450, height=450');",
                    true
                );


                return;
            }


            if (!inviteeRepos.IsRegistered(regCode))
            {
                Response.Redirect(redirect_url);
            }
            else
            {
                lblRegResult.Text = "User already registered";
            }
        }
        public List <RegistrationStatus> GetRecords()
        {
            InviteeRepository invRepos = new InviteeRepository();

            return(invRepos.GetRegistartionStatus());
        }
        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();
        }