Exemple #1
0
        protected void btnSearchDonor_Click(object sender, EventArgs e)
        {
            var donorEventList = new DonorEventList(User.Identity.Name);

            gvDonorList.DataSource = donorEventList.GetDonorList_Search(ddlEvent2.SelectedValue, txtLName.Text, 0);
            gvDonorList.DataBind();
        }
Exemple #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            lblMessage.Text = User.Identity.Name;

            var browser = Request.Browser;

            if (!Page.IsPostBack)
            {
                var eventList = new EventList(User.Identity.Name);

                ddlEvents.DataSource     = eventList.GetEvents();
                ddlEvents.DataTextField  = "EName";
                ddlEvents.DataValueField = "pk_Event";
                ddlEvents.DataBind();

                ddlEvent2.DataSource     = eventList.GetEvents();
                ddlEvent2.DataTextField  = "EName";
                ddlEvent2.DataValueField = "pk_Event";
                ddlEvent2.DataBind();
            }

            if (browser.Type.Contains("Safari"))
            {
                pnlPC.Visible   = false;
                pnlIPad.Visible = true;

                if (Page.IsPostBack)
                {
                    return;
                }

                var donorEventList = new DonorEventList(User.Identity.Name);

                gvDonorList.DataSource = donorEventList.GetDonorList_Search(ddlEvent2.SelectedValue, txtLName.Text, 100);
                gvDonorList.DataBind();
            }
            else
            {
                pnlPC.Visible   = true;
                pnlIPad.Visible = false;

                lblMessage.ForeColor = System.Drawing.Color.Red;

                if (Page.IsPostBack)
                {
                    return;
                }

                var donorEventList = new DonorEventList(User.Identity.Name);

                gvRegistrations.DataSource = donorEventList.GetRecentResponses(15);
                gvRegistrations.DataBind();
            }
        }