protected void fillEditUserForm()
        {
            consignorsPanel.Visible = false;
            editUserInfo.Visible = false;

            mySqlConnector mySqlConn = new mySqlConnector();
            if(mySqlConn.isInitialized()){

                if (mySqlConn.getUserInfo(Session["emailAddress"].ToString()))
                {
                    FirstName.Text = mySqlConn.UserObj.FirstName;
                    LastName.Text = mySqlConn.UserObj.LastName;
                    Email.Text = mySqlConn.UserObj.Email;

                    //split this string
                    PhoneNumber.Text = mySqlConn.UserObj.Phone;

                    Address1.Text = mySqlConn.UserObj.Address1;
                    Address2.Text = mySqlConn.UserObj.Address2;
                    City.Text = mySqlConn.UserObj.City;
                    State.SelectedValue = State.Items.FindByValue(mySqlConn.UserObj.State).Value;
                    stateVal = mySqlConn.UserObj.State;

                    //split this string
                    Zip.Text = mySqlConn.UserObj.Zip;
                    Zip2.Text = mySqlConn.UserObj.Zip2;

                    OptIn.Checked = mySqlConn.UserObj.mailingList;
                }

            }
            else{
                displayEditErrors("DB Error. Please refresh and try again.");
            }
        }
        protected void autoLogin()
        {
            mySqlConnector mySqlconn = new mySqlConnector();
            if (mySqlconn.isInitialized())
            {
                responseText.Visible = true;
                if (mySqlconn.login("*****@*****.**", "testing"))
                {
                    //validated, so write user session info
                    Session["firstname"] = mySqlconn.UserObj.FirstName;
                    Session["lastName"] = mySqlconn.UserObj.LastName;
                    Session["emailAddress"] = mySqlconn.UserObj.Email;
                    Session["isConsignor"] = mySqlconn.UserObj.isConsignor;
                    Session["isAdmin"] = mySqlconn.UserObj.isAdmin;
                    Session["userId"] = mySqlconn.UserObj.UserId;
                    Session["isLoggedIn"] = true;

                    //close connection
                    mySqlconn.deInitialize();

                    redirectUser();
                }
                else
                {
                    //displayResponseMessage(true, "Email & password combination are incorrect.  <br/>Please try again.");
                    displayResponseMessage(true, mySqlconn.connErrMsg);
                }
            }
            else
            {
                string whatGives = mySqlconn.testConnection();
                displayResponseMessage(true, "Database Connection Failure: " + whatGives);
            }
        }
        protected string joinMailingListSuccess()
        {
            string addToMailingList = Request.QueryString["a"];
            string emailAddress = Request.QueryString["e"];
            string errMsg = String.Empty;

            if (addToMailingList != "")
            {
                mySqlConnector mySqlConn = new mySqlConnector();
                try
                {
                    if (mySqlConn.isInitialized())
                    {
                        return mySqlConn.joinMailingList(emailAddress)?  "true" : mySqlConn.connErrMsg;
                    }
                    else
                    {
                        return "db connection err";
                    }
                }
                catch(Exception ee)
                {
                    errMsg = ee.Message.ToString();
                    return "db connection error";
                }

            }
            else
            {
                return "err";
            }
        }
        protected void verifyConsignor(string consignorEmail, string consignorID, string adminID)
        {
            string dbErr = "dbErr";

            mySqlConnector mySqlConn = new mySqlConnector();
            if (mySqlConn.isInitialized())
            {
                if (mySqlConn.callApproveConsignor(consignorEmail, consignorID, adminID))
                {
                    mySqlConn.deInitialize();
                    dbErr = "";
                }
            }

            Response.Redirect("~/Admin/Default.aspx?err=" + dbErr + "&f=approveconsignor&eid=" + consignorEmail);
        }
        protected void authenticateUser()
        {
            mySqlConnector mySqlconn = new mySqlConnector();
            if (mySqlconn.isInitialized())
            {
                if (mySqlconn.login(EmailAddress.Text, Password.Text, false))
                {
                    //validated, so write user session info
                    Session["firstname"] = mySqlconn.UserObj.FirstName;
                    Session["lastName"] = mySqlconn.UserObj.LastName;
                    Session["emailAddress"] = mySqlconn.UserObj.Email;
                    Session["isConsignor"] = mySqlconn.UserObj.isConsignor;
                    Session["isAdmin"] = mySqlconn.UserObj.isAdmin;
                    Session["userId"] = mySqlconn.UserObj.UserId;
                    Session["isLoggedIn"] = true;

                    //close connection
                    mySqlconn.deInitialize();
                    //success!
                    redirectUser();
                }
                else
                {//AUTHENTICATION HAS FAILED
                    //displayResponseMessage(true, "Email & password combination are incorrect.  <br/>Please try again.");
                    string errMsg = mySqlconn.connErrMsg;

                    if (errMsg.IndexOf("Please register") > 0)
                    {
                        displayResponseMessage(true, errMsg);
                    }
                    else
                    {
                        displayResponseMessage(true, mySqlconn.connErrMsg);
                        return;
                    }
                }
            }
            else
            {
                string whatGives = mySqlconn.testConnection();
                displayResponseMessage(true, "Database Connection Failure: " + whatGives);
            }
        }
        protected void saveInventoryForm(Dictionary<string, string> inventoryUploadForm)
        {
            saveErr = "";

            try
            {
                mySqlConnector mySqlConn = new mySqlConnector();
                if (mySqlConn.isInitialized())
                {
                    saveErr = mySqlConn.uploadInventory(inventoryUploadForm) ? "" : mySqlConn.connErrMsg;
                    if (saveErr != "")
                    {
                        displayFormErrors();
                    }
                    mySqlConn.deInitialize();
                }
                else
                {
                    if (mySqlConn.connErrMsg == "already registered")
                    {
                        saveErr = "Email Address already registered.";
                        //trigger reset password link
                    }
                    else
                    {
                        saveErr = "Error connecting to database. Please try again later.";
                    }
                    displayFormErrors();
                    return;
                }
            }
            catch (Exception ee)
            {
                saveErr = ee.Message.ToString();
                displayFormErrors();
                return;
            }

            //push user to success page and consignment agreement
               // Response.Redirect("~/Default.aspx");
        }
        protected void showConsignorsPanel()
        {
            string errMsg = string.Empty;

            mySqlConnector mySqlConn = new mySqlConnector();

            if (mySqlConn.isInitialized())
            {
                BoundField eventTitle = new BoundField();
                eventTitle.ReadOnly = true;
                eventTitle.HeaderText = "Event";
                eventTitle.DataField = "eventtitle";
                //eventTitle.SortExpression = "eventtitle";
                gvExportList.Columns.Add(eventTitle);

                BoundField venue = new BoundField();
                venue.ReadOnly = true;
                venue.HeaderText = "Venue";
                venue.DataField = "venue";
                //venue.SortExpression = "venue";
                gvExportList.Columns.Add(venue);

                BoundField eventDate = new BoundField();
                eventDate.ReadOnly = true;
                eventDate.HeaderText = "Date";
                eventDate.DataField = "eventdate";
                //eventDate.SortExpression = "eventdate";
                gvExportList.Columns.Add(eventDate);

                BoundField eventTime = new BoundField();
                eventTime.ReadOnly = true;
                eventTime.HeaderText = "Time";
                eventTime.DataField = "eventtime";
            //	eventTime.SortExpression = "eventtime";
                gvExportList.Columns.Add(eventTime);

                BoundField qty = new BoundField();
                qty.ReadOnly = true;
                qty.HeaderText = "Qty";
                qty.DataField = "quantity";
                //qty.SortExpression = "quantity";
                gvExportList.Columns.Add(qty);

                BoundField sec = new BoundField();
                sec.ReadOnly = true;
                sec.HeaderText = "Section";
                sec.DataField = "section";
                //sec.SortExpression = "section";
                gvExportList.Columns.Add(sec);

                BoundField seatRow = new BoundField();
                seatRow.ReadOnly = true;
                seatRow.HeaderText = "Row";
                seatRow.DataField = "seatrow";
                //seatRow.SortExpression = "seatrow";
                gvExportList.Columns.Add(seatRow);

                BoundField seatFrom = new BoundField();
                seatFrom.ReadOnly = true;
                seatFrom.HeaderText = "From";
                seatFrom.DataField = "seatfrom";
                //seatFrom.SortExpression = "seatfrom";
                gvExportList.Columns.Add(seatFrom);

                BoundField seatThru = new BoundField();
                seatThru.ReadOnly = true;
                seatThru.HeaderText = "Thru";
                seatThru.DataField = "seatthru";
                //seatThru.SortExpression = "seatthru";
                gvExportList.Columns.Add(seatThru);

                BoundField cost = new BoundField();
                cost.ReadOnly = true;
                cost.HeaderText = "Price";
                cost.DataField = "cost";
                //cost.SortExpression = "cost";
                gvExportList.Columns.Add(cost);

                BoundField cNotes = new BoundField();
                cNotes.ReadOnly = true;
                cNotes.HeaderText = "Notes";
                cNotes.DataField = "consignornotes";
                //cNotes.SortExpression = "consignornotes";
                gvExportList.Columns.Add(cNotes);

                //now make call to database for rows
                if (mySqlConn.getExportList(Convert.ToInt16(Session["userId"]), true))
                {
                    gvExportList.DataSource = null;
                    gvExportList.Dispose();
                    gvExportList.DataSource = mySqlConn.ds;
                    gvExportList.DataBind();
                }
                else
                {
                    noExports.Text = mySqlConn.connErrMsg;
                    noExports.Visible = true;
                }
            }
            else
            {
                errMsg = "db connection error!";
                displayMySqlConnErr(errMsg);
            }

            mySqlConn.deInitialize();

            consignorsPanel.Visible = true;
        }
        protected void saveEditedUserInfo(Dictionary<string, string> formInfo)
        {
            saveErr = "";

            try
            {
                mySqlConnector mySqlConn = new mySqlConnector();
                if (mySqlConn.isInitialized())
                {
                    saveErr = mySqlConn.saveUserEditInfo(Email.Text, formInfo) ? "" : mySqlConn.connErrMsg;
                    if (saveErr != "")
                    {
                        displayEditErrors(saveErr);
                        mySqlConn.deInitialize();
                    }
                    else
                    {   //write new session values
                        Session["emailAddress"] = formInfo["Email"];
                        Session["firstname"] = formInfo["First Name"];
                        Session["lastName"] = formInfo["Last Name"];

                        mySqlConn.deInitialize();
                        resetPage("Your Information has been updated!");
                    }
                }
                else
                {
                    displayEditErrors(mySqlConn.connErrMsg);
                }
            }
            catch (Exception ee)
            {
                displayEditErrors(ee.Message.ToString());
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (IsPostBack)
            {
                string formType = Request.Form["formType"];
                string selPhoneType = Request.Form["selPhoneType"];
                string txtCity = Request.Form["txtCity"];
                string txtDateTime = Request.Form["txtDateTime"];
                string txtDescription = Request.Form["txtDescription"];
                string txtEmail = Request.Form["txtEmail"];
                string txtEvent = Request.Form["txtEvent"];
                string txtFName = Request.Form["txtFName"];
                string txtLName = Request.Form["txtLName"];
                string txtPhone = Request.Form["txtPhone"];
                string txtPriceRange = Request.Form["txtPriceRange"];
                string txtSeating = Request.Form["txtSeating"];
                string txtState = Request.Form["txtState"];
                string txtStreet = Request.Form["txtStreet"];
                string txtStreet2 = Request.Form["txtStreet2"];
                string txtVenue = Request.Form["txtVenue"];
                string txtZip = Request.Form["txtZip"];

                Dictionary<string, string> formDetails = new Dictionary<string, string>();
                formDetails.Add("formType", formType);
                formDetails.Add("Best Time To Call", selPhoneType);
                formDetails.Add("City", txtCity);
                formDetails.Add("Date", txtDateTime);
                formDetails.Add("Description", txtDescription);
                formDetails.Add("Email", txtEmail);
                formDetails.Add("Event", txtEvent);
                formDetails.Add("First Name", txtFName);
                formDetails.Add("Last Name", txtLName);
                formDetails.Add("Phone Number", txtPhone);
                formDetails.Add("Price Range", txtPriceRange);
                formDetails.Add("Seats", txtSeating);
                formDetails.Add("State", txtState);
                formDetails.Add("Address1", txtStreet);
                formDetails.Add("Address2", txtStreet2);
                formDetails.Add("Venue", txtVenue);
                formDetails.Add("Zip", txtZip);

                String strErrMsg = String.Empty;
                mySqlConnector mySqlConn = new mySqlConnector();
                if (mySqlConn.isInitialized())
                {
                    if (mySqlConn.sendTicketRequest(formDetails))
                    {
                        Response.Redirect("~/tickets/ticketRequestSuccess.aspx");
                        return;
                    }
                    else
                    {
                        strErrMsg = mySqlConn.connErrMsg;
                    }
                }
                else
                {
                    strErrMsg = "Error connecting to Database.  Please refresh the page and try again.";
                }

                Response.Redirect("~/content/generalError.aspx?e=" + strErrMsg);
                return;
            }
            else
            {

                int bid = 3939;
                int siteId = 3;
                string evtId = Request.QueryString["evtId"];

                string plugin = "<script type=\"text/javascript\" src=\"http://tickettransaction.com/?bid=" + bid;
                plugin += "&sitenumber=" + siteId + "&tid=507&evtid=" + evtId + "\"></script>";
                ticketDetail.Text = plugin;

            //-- FB PLUGIN STUFF	#####################################################

                String ogURL = HttpContext.Current.Request.Url.ToString();
                    if (ogURL.IndexOf("Jay-Z") > 0 && ogURL.IndexOf("Kanye") > 0)
                    {
                        ogURL = ogURL + "&fbid=12";
                    }

                //title for facebook post/message
                String ogTitle = Request.QueryString["event"];
                ogTitle = ogTitle.Replace("+", " ");
                ogTitle = ogTitle.Replace("%20", " ");

                //the meta tags
                StringBuilder fbMetaTags = new StringBuilder();
                    fbMetaTags.Append("<meta property=\"og:title\" content=\"" + ogTitle + "\" />");
                    fbMetaTags.Append("<meta property=\"og:type\" content=\"activity\" />");
                    fbMetaTags.Append("<meta property=\"og:url\" content=\"" + ogURL + "\" />");
                    fbMetaTags.Append("<meta property=\"og:image\" content=\"http://www.rockstarseating.com/assets/img/hdrLogo.png\" />");
                    fbMetaTags.Append("<meta property=\"og:site_name\" content=\"Rockstar Seating\" />");
                    fbMetaTags.Append("<meta property=\"fb:admins\" content=\"1604973672\" />");
                this.metaTags.Text = fbMetaTags.ToString();

                // the script
                StringBuilder sb = new StringBuilder();
                    sb.Append("<div id=\"fb-root\"></div>");
                    sb.Append("<script type=\"text/javascript\">");
                    sb.Append("(function (d, s, id) {");
                    sb.Append("var js, fjs = d.getElementsByTagName(s)[0];");
                    sb.Append("if (d.getElementById(id)) { return; }");
                    sb.Append("js = d.createElement(s); js.id = id;");
                    sb.Append("js.src = \"//connect.facebook.net/en_US/all.js#xfbml=1&appId=202160576522677\";");
                    sb.Append("fjs.parentNode.insertBefore(js, fjs);");
                    sb.Append("} (document, 'script', 'facebook-jssdk'));");
                    sb.Append("</script>");

                    sb.Append("<div class=\"fb-like\" data-href=\"" + ogURL + "\"");
                    sb.Append(" data-send=\"true\" data-layout=\"button_count\" data-width=\"200\"");
                    sb.Append(" data-show-faces=\"true\" data-action=\"recommend\" data-font=\"arial\"></div>");
                this.likeBtn.Text = sb.ToString();

            }//end postBack check
        }
        protected void showPendingInventoryExports()
        {
            string errMsg = string.Empty;

            mySqlConnector mySqlConn = new mySqlConnector();

            if (mySqlConn.isInitialized())
            {
                if (mySqlConn.getExportList())
                {
                    GVExportList_Clear();

                    if (gvExportList.Columns.Count < 1)
                    {

                        BoundField userId = new BoundField();
                        userId.ReadOnly = true;
                        userId.HeaderText = "UserId";
                        userId.DataField = "emailaddress";
                        //userId.SortExpression = "emailaddress";
                        gvExportList.Columns.Add(userId);

                        BoundField eventTitle = new BoundField();
                        eventTitle.ReadOnly = true;
                        eventTitle.HeaderText = "Event";
                        eventTitle.DataField = "eventtitle";
                        //eventTitle.SortExpression = "eventtitle";
                        gvExportList.Columns.Add(eventTitle);

                        BoundField venue = new BoundField();
                        venue.ReadOnly = true;
                        venue.HeaderText = "Venue";
                        venue.DataField = "venue";
                        //venue.SortExpression = "venue";
                        gvExportList.Columns.Add(venue);

                        BoundField eventDate = new BoundField();
                        eventDate.ReadOnly = true;
                        eventDate.HeaderText = "Date";
                        eventDate.DataField = "eventdate";
                        //eventDate.SortExpression = "eventdate";
                        gvExportList.Columns.Add(eventDate);

                        BoundField eventTime = new BoundField();
                        eventTime.ReadOnly = true;
                        eventTime.HeaderText = "Time";
                        eventTime.DataField = "eventtime";
                        //	eventTime.SortExpression = "eventtime";
                        gvExportList.Columns.Add(eventTime);

                        BoundField qty = new BoundField();
                        qty.ReadOnly = true;
                        qty.HeaderText = "Qty";
                        qty.DataField = "quantity";
                        //qty.SortExpression = "quantity";
                        gvExportList.Columns.Add(qty);

                        BoundField sec = new BoundField();
                        sec.ReadOnly = true;
                        sec.HeaderText = "Section";
                        sec.DataField = "section";
                        //sec.SortExpression = "section";
                        gvExportList.Columns.Add(sec);

                        BoundField seatRow = new BoundField();
                        seatRow.ReadOnly = true;
                        seatRow.HeaderText = "Row";
                        seatRow.DataField = "seatrow";
                        //seatRow.SortExpression = "seatrow";
                        gvExportList.Columns.Add(seatRow);

                        BoundField seatFrom = new BoundField();
                        seatFrom.ReadOnly = true;
                        seatFrom.HeaderText = "From";
                        seatFrom.DataField = "seatfrom";
                        //seatFrom.SortExpression = "seatfrom";
                        gvExportList.Columns.Add(seatFrom);

                        BoundField seatThru = new BoundField();
                        seatThru.ReadOnly = true;
                        seatThru.HeaderText = "Thru";
                        seatThru.DataField = "seatthru";
                        //seatThru.SortExpression = "seatthru";
                        gvExportList.Columns.Add(seatThru);

                        BoundField cost = new BoundField();
                        cost.ReadOnly = true;
                        cost.HeaderText = "Price";
                        cost.DataField = "cost";
                        //cost.SortExpression = "cost";
                        gvExportList.Columns.Add(cost);

                        BoundField cNotes = new BoundField();
                        cNotes.ReadOnly = true;
                        cNotes.HeaderText = "Notes";
                        cNotes.DataField = "consignornotes";
                        //cNotes.SortExpression = "consignornotes";
                        gvExportList.Columns.Add(cNotes);

                        gvExportList.DataSource = mySqlConn.ds;
                        gvExportList.DataBind();
                    }
                }
                else
                {
                    GVExportList_Clear();
                    noExports.Text = mySqlConn.connErrMsg;
                    noExports.Visible = true;
                }
            }
            else
            {
                errMsg = "db connection error!";
                displayFormErrors(errMsg);
            }

            mySqlConn.deInitialize();
        }
        protected void getLastExportTime()
        {
            string lastExport = String.Empty;
            mySqlConnector mySqlConn = new mySqlConnector();

            if (mySqlConn.isInitialized())
            {
                lastExport = mySqlConn.getLastInventoryExport();
            }
            else
            {
                lastExport = "db connection error!";
            }
            mySqlConn.deInitialize();
            lastExported.Text = lastExport;
        }
        protected void checkForConsignmentApprovals()
        {
            string errMsg = string.Empty;
            string statusMsg = string.Empty;
            string cEmailID = (!String.IsNullOrEmpty(Request.QueryString["eid"]))? Request.QueryString["eid"].ToString() : "";
            string dbErr =
            (!String.IsNullOrEmpty(Request.QueryString["dbErr"]))? Request.QueryString["dbErr"].ToString() : "";
            string funkShun =
            (!String.IsNullOrEmpty(Request.QueryString["f"]))? Request.QueryString["f"].ToString() : "";

            if (funkShun == "approveconsignor")
            {
                if (dbErr == "")
                {
                    statusMsg = "Consignor [ " + cEmailID + " ] approved.";
                    lblStatusMsg.CssClass = "statusMsg";
                }
                else
                {
                    statusMsg = "DB error on Consignor Approval: [ " + cEmailID + " ]. Please try again.";
                    lblStatusMsg.CssClass = "errMsg";
                }

                lblStatusMsg.Visible = true;
                lblStatusMsg.Text = statusMsg;
            }

            mySqlConnector mySqlConn = new mySqlConnector();

            if (mySqlConn.isInitialized())
            {
                //--	now check db for pending approvals
                if (mySqlConn.checkForPending_C_Approvals())
                {
                    HyperLinkField userId = new HyperLinkField();
                    userId.HeaderText = "UserId";
                    userId.DataTextField = "emailaddress";
                    userId.DataNavigateUrlFields = new string[] { "emailaddress", "userId" };
                    userId.DataNavigateUrlFormatString = "~/admin/approveConsignor.aspx?eid={0}&uid={1}&aid=" + Session["emailAddress"].ToString();
                    //userId.SortExpression = "emailaddress";
                    gvConsingorApproveList.Columns.Add(userId);

                    BoundField firstname = new BoundField();
                    firstname.ReadOnly = true;
                    firstname.HeaderText = "First";
                    firstname.DataField = "firstname";
                    //firstname.SortExpression = "firstname";
                    gvConsingorApproveList.Columns.Add(firstname);

                    BoundField lastname = new BoundField();
                    lastname.ReadOnly = true;
                    lastname.HeaderText = "Last";
                    lastname.DataField = "lastname";
                    //lastname.SortExpression = "lastname";
                    gvConsingorApproveList.Columns.Add(lastname);

                    BoundField address1 = new BoundField();
                    address1.ReadOnly = true;
                    address1.HeaderText = "Address";
                    address1.DataField = "address1";
                    //address1.SortExpression = "address1";
                    gvConsingorApproveList.Columns.Add(address1);

                    BoundField address2 = new BoundField();
                    address2.ReadOnly = true;
                    address2.HeaderText = "Address2";
                    address2.DataField = "address2";
                    //	address2.SortExpression = "address2";
                    gvConsingorApproveList.Columns.Add(address2);

                    BoundField city = new BoundField();
                    city.ReadOnly = true;
                    city.HeaderText = "City";
                    city.DataField = "city";
                    //city.SortExpression = "city";
                    gvConsingorApproveList.Columns.Add(city);

                    BoundField state = new BoundField();
                    state.ReadOnly = true;
                    state.HeaderText = "State";
                    state.DataField = "state";
                    //state.SortExpression = "state";
                    gvConsingorApproveList.Columns.Add(state);

                    BoundField zip = new BoundField();
                    zip.ReadOnly = true;
                    zip.HeaderText = "Zip";
                    zip.DataField = "zip";
                    //	zip.SortExpression = "zip";
                    gvConsingorApproveList.Columns.Add(zip);

                    BoundField phoneNumber = new BoundField();
                    phoneNumber.ReadOnly = true;
                    phoneNumber.HeaderText = "Phone";
                    phoneNumber.DataField = "phoneNumber";
                    //phoneNumber.SortExpression = "phoneNumber";
                    gvConsingorApproveList.Columns.Add(phoneNumber);

                    BoundField createDate = new BoundField();
                    createDate.ReadOnly = true;
                    createDate.HeaderText = "__date";
                    createDate.DataField = "created";
                    //phoneNumber.SortExpression = "phoneNumber";
                    gvConsingorApproveList.Columns.Add(createDate);

                    gvConsingorApproveList.DataSource = null;
                    gvConsingorApproveList.Dispose();
                    gvConsingorApproveList.DataSource = mySqlConn.ds;
                    gvConsingorApproveList.DataBind();
                    consingorApproveList.Visible = true;
                }
                else
                {
                    noConsignors.Text = mySqlConn.connErrMsg;
                    noConsignors.Visible = true;
                }
            }
            else
            {
                errMsg = "db connection error!";
                displayFormErrors(errMsg);
            }

            mySqlConn.deInitialize();
        }
        protected void exportBtn_click(object sender, EventArgs e)
        {
            //ten fields for export
            string[] columnHeaderList = new string[]{"Event, Venue, EventDate, EventTime, Quantity, Section, Row, SeatFrom, SeatThru, Notes, Cost"};

            List<List<string>> exportList;

            mySqlConnector mySqlConn = new mySqlConnector();

            if (mySqlConn.isInitialized())
            {
                exportList = mySqlConn.exportLatestUploads();

                if (exportList.Count < 1)
                {
                    noExports.Text = "Nothing to export.";
                    noExports.Visible = true;
                }
                else
                {
                    List<string> exportItem = exportList[0];
                    if (exportItem[0].IndexOf("Error:") > -1)
                    {
                        displayFormErrors(exportList[0].ToString());
                    }
                    else
                    {
                        mySqlConn.deInitialize();
                        showPendingInventoryExports();
                        CSVExporter csvExport = new CSVExporter(exportList, columnHeaderList);
                    }

                }
                mySqlConn.deInitialize();
            }
            else
            {
                displayFormErrors("Error connecting to database!");
            }
        }
        protected void saveUserInfo(Dictionary<string, string> formInfo)
        {
            saveErr = "";

            try
            {
                mySqlConnector mySqlConn = new mySqlConnector();
                if (mySqlConn.isInitialized() && mySqlConn.registerUser(formInfo))
                {
                    saveErr = mySqlConn.login(Email.Text, Password.Text) ? "" : mySqlConn.connErrMsg;
                    if (saveErr != "")
                    {
                        displayFormErrors();
                        mySqlConn.deInitialize();
                    }
                    else
                    {   //write session out for sng
                        Session["emailAddress"] = Email.Text;
                        Session["firstName"] = FirstName.Text;
                        Session["lastName"] = LastName.Text;
                        Session["isLoggedIn"] = true;
                        Session["userId"] = mySqlConn.UserObj.UserId;

                        //push user to success page and consignment agreement
                        mySqlConn.deInitialize();
                        Response.Redirect("RegisterSuccess.aspx");
                    }
                }
                else
                {
                    if (mySqlConn.connErrMsg == "already registered")
                    {
                        saveErr = "Email Address already registered.";
                    }
                    else
                    {
                        //TODO: refactor this code to produce a more specific error that can be reported??
                        saveErr = mySqlConn.connErrMsg;
                    }
                    displayFormErrors();
                }
            }
            catch (Exception ee)
            {
                saveErr = ee.Message.ToString();
                displayFormErrors();
            }
        }