protected void Page_Load(object sender, EventArgs e)
        {
            IsInGroup groupTest = null;
            if (Request.Url.Host.ToLower() == "localhost")
            {
                //base.login_user_id = _UserId = 40123; //user
                //base.login_user_id = _UserId = 40110; //exec producer -- skip
                //base.login_user_id = _UserId = 272; //producer -- elyse
                //base.login_user_id = _UserId = 205; //coordinator
                base.login_user_id = _UserId = 144; //administrator -- randy

                theader.Visible = false;
                aheader.Visible = false;
                levaNav.Visible = false;
                tfooter.Visible = false;
                levbNav.Visible = false;
                groupTest = TestGroupMembership;
            }
            else
            {
                base.Page_Load("/newallocations/TeamAllocation.aspx");
                _UserId = base.login_user_id;
                groupTest = base.testmembership;
            }

            // determine if the user's group and set a variable to use when printing out allocations
            DBHelper db = new DBHelper();
            if (groupTest.Invoke(ref db, "A3Coordinator"))
                _secType = RgaWeb.SecurityType.EditAll;
            if (groupTest.Invoke(ref db, "A2Administrator"))
                _secType = RgaWeb.SecurityType.EditAll;
            if (groupTest.Invoke(ref db, "A8Producer"))
                _secType = RgaWeb.SecurityType.EditUpcoming;
            if (groupTest.Invoke(ref db, "A5ExecProducer"))
                _secType = RgaWeb.SecurityType.EditUpcoming;

            if (!Page.IsPostBack)
            {
                LoadRegions();
                LoadDepartments();

                // retrieve current week and date 
                _StartWeek = RgaData.Utility.CurrectWeek();
                _StartDate = RgaData.Utility.CurrectWeekStartDate(_StartWeek);

                // setup week picker
                ctlWeekPicker.CurrentWeek = _StartWeek;
                ctlWeekPicker.CurrectWeekStartDate = _StartDate;
            }
            else
            {
                // set start week
                _StartWeek = ctlWeekPicker.CurrentWeek;
            }

            // set up delegate to rebind the grid when week selection is changed
            DelSelectWeek delSelectWeek = new DelSelectWeek(this.ctlWeekPicker_SelectedIndexChanged);
            ctlWeekPicker.UpdateCurrentWeek = delSelectWeek;
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            IsInGroup groupTest = null;

            if (Request.Url.Host.ToLower() == "localhost")
            {
                //base.login_user_id = _UserId = 40123; //user
                //base.login_user_id = _UserId = 40110; //exec producer -- skip
                //base.login_user_id = _UserId = 272; //producer -- elyse
                //base.login_user_id = _UserId = 205; //coordinator
                base.login_user_id = _UserId = 144; //administrator -- randy

                theader.Visible = false;
                aheader.Visible = false;
                levaNav.Visible = false;
                tfooter.Visible = false;
                levbNav.Visible = false;
                groupTest = TestGroupMembership;
            }
            else
            {
                base.Page_Load("/newallocations/DeptAllocation.aspx");
                _UserId = base.login_user_id;
                groupTest = base.testmembership;
            }

            // determine if the user's group and set a variable to use when printing out allocations
            DBHelper db = new DBHelper();
            if (groupTest.Invoke(ref db, "A3Coordinator"))
                _secType = RgaWeb.SecurityType.EditAll;
            if (groupTest.Invoke(ref db, "A2Administrator"))
                _secType = RgaWeb.SecurityType.EditAll;

            if (!Page.IsPostBack)
            {
                // retrieve current week and date 
                _WeekNumber = RgaData.Utility.CurrectWeek();
                _StartDate = RgaData.Utility.CurrectWeekStartDate(_WeekNumber);

                // setup week picker
                WeekPicker1.CurrentWeek = _WeekNumber;
                WeekPicker1.CurrectWeekStartDate = _StartDate;

                WeekNumber.Value = _WeekNumber.ToString();
            }
            WeekPicker1.WeekSpan = 1;
            WeekPicker1.ShowEndDate = false;
            DelSelectWeek delSelectWeek = new DelSelectWeek(this.WeekPicker1_SelectedIndexChanged);
            WeekPicker1.UpdateCurrentWeek = delSelectWeek;
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            IsInGroup groupTest = null;
            DelSelectWeek delSelectWeek = new DelSelectWeek(this.ctlWeekPicker_SelectedIndexChanged);
            ctlWeekPicker.UpdateCurrentWeek = delSelectWeek;

            if (Request.Url.Host.ToLower() == "localhost")
            {
                //base.login_user_id = _UserId = 40123; //user
                //base.login_user_id = _UserId = 40110; //exec producer -- skip
                //base.login_user_id = _UserId = 272; //producer -- elyse
                //base.login_user_id = _UserId = 205; //coordinator
                base.login_user_id = _UserId = 144; //administrator -- randy

                theader.Visible = false;
                aheader.Visible = false;
                levaNav.Visible = false;
                tfooter.Visible = false;
                levbNav.Visible = false;
                groupTest = TestGroupMembership;
            }
            else
            {
                base.Page_Load("/newallocations/ProjectAllocation.aspx");
                _UserId = base.login_user_id;
                groupTest = base.testmembership;
            }


            DBHelper db = new DBHelper();
            if (groupTest.Invoke(ref db, "A3Coordinator"))
                _UserType = RgaWeb.SecurityType.EditAll;
            if (groupTest.Invoke(ref db, "A2Administrator"))
                _UserType = RgaWeb.SecurityType.EditAll;
            if (groupTest.Invoke(ref db, "A8Producer"))
                _UserType = RgaWeb.SecurityType.EditUpcoming;
            if (groupTest.Invoke(ref db, "A5ExecProducer"))
                _UserType = RgaWeb.SecurityType.EditUpcoming;

            if (!Page.IsPostBack)
            {
                LoadClients();
                LoadJobs(_ClientId);
                LoadRegions();

                // retrieve current week and date 
                _StartWeek = RgaData.Utility.CurrectWeek();
                _StartDate = RgaData.Utility.CurrectWeekStartDate(_StartWeek);

                // setup week picker
                ctlWeekPicker.CurrentWeek = _StartWeek;
                ctlWeekPicker.CurrectWeekStartDate = _StartDate;

                //handle incoming date parameter as well
                if (Request.QueryString["Week"] != null)
                {
                    int week = -1;
                    Int32.TryParse(Request.QueryString["Week"], out week);
                    if (week != -1)
                    {
                        _StartWeek = week;
                        _StartDate = RgaData.Utility.CurrectWeekStartDate(_StartWeek);
                        ctlWeekPicker.CurrentWeek = _StartWeek;
                        ctlWeekPicker.CurrectWeekStartDate = _StartDate;
                    }
                }
                //if the qs has a project id, load up the page with that project
                if (Request.QueryString["ProjectId"] != null)
                {
                    int proj = Convert.ToInt32(Request.QueryString["ProjectId"]);
                    int client = RgaData.Utility.GetClientIdForJob(proj);
                    AllOrAssigned.SelectedIndex = 0;
                    LoadClients();
                    ClientsDrop.SelectedValue = client.ToString();
                    LoadJobs(client);
                    JobsDrop.SelectedValue = proj.ToString();
                    SetFilterValues();
                    BindGrid();
                }
                SetManageLinkVisibility();
            }
            else
            {
                // set start week
                _StartWeek = ctlWeekPicker.CurrentWeek;
                _ClientId = Convert.ToInt32(ClientsDrop.SelectedValue);
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            IsInGroup groupTest = null;
            DelSelectWeek delSelectWeek = new DelSelectWeek(this.ctlWeekPicker_SelectedIndexChanged);
            ctlWeekPicker.UpdateCurrentWeek = delSelectWeek;

            if (Request.Url.Host.ToLower() == "localhost")
            {
                //base.login_user_id = _UserId = 40123; //user
                //base.login_user_id = _UserId = 40110; //exec producer -- skip
                //base.login_user_id = _UserId = 272; //producer -- elyse
                //base.login_user_id = _UserId = 205; //coordinator
                base.login_user_id = _UserId = 144; //administrator -- randy

                theader.Visible = false;
                aheader.Visible = false;
                levaNav.Visible = false;
                tfooter.Visible = false;
                levbNav.Visible = false;
                groupTest = TestGroupMembership;
            }
            else
            {
                base.Page_Load("/newallocations/EmployeeAllocation.aspx");
                _UserId = base.login_user_id;
                groupTest = base.testmembership;
            }

            DBHelper db = new DBHelper();
            if (groupTest.Invoke(ref db, "A3Coordinator"))
                _UserType = RgaWeb.SecurityType.EditAll;
            if (groupTest.Invoke(ref db, "A2Administrator"))
                _UserType = RgaWeb.SecurityType.EditAll;

            if (!Page.IsPostBack)
            {
                LoadDepts();

                // retrieve current week and date 
                _StartWeek = RgaData.Utility.CurrectWeek();
                _StartDate = RgaData.Utility.CurrectWeekStartDate(_StartWeek);

                // setup week picker
                ctlWeekPicker.CurrentWeek = _StartWeek;
                ctlWeekPicker.CurrectWeekStartDate = _StartDate;

                //handle incoming date parameter as well
                if (Request.QueryString["Week"] != null)
                {
                    int week = -1;
                    Int32.TryParse(Request.QueryString["Week"], out week);
                    if (week != -1)
                    {
                        _StartWeek = week;
                        _StartDate = RgaData.Utility.CurrectWeekStartDate(_StartWeek);
                        ctlWeekPicker.CurrentWeek = _StartWeek;
                        ctlWeekPicker.CurrectWeekStartDate = _StartDate;
                    }
                }
                //if a user-id is passed in on the qs, set dropdowns and databind
                if (Request.QueryString["EmpId"] != null)
                {
                    int user = Convert.ToInt32(Request.QueryString["EmpId"]);
                    int dept = RgaData.Utility.GetDeptIdForUser(user);
                    if (dept != -1)
                    {
                        DeptsDrop.SelectedValue = dept.ToString();
                        LoadEmps(dept);
                        EmpsDrop.SelectedValue = user.ToString();
                        SetFilterValues();
                        BindGrid();
                    }
                }
            }
            else
            {
                // set start week
                _StartWeek = ctlWeekPicker.CurrentWeek;
                _DeptId = Convert.ToInt32(DeptsDrop.SelectedValue);
            }
        }