/// <summary>
        /// Sets the User's location and access based on what is stored in the database.  See UtilityCashFlow
        /// </summary>
        protected void SetUpUser()
        {
            this.isAdminUser = utility.GetIsAdminUser();
            this.isCMUser    = utility.GetIsCMUser();
            this.isDeptUser  = utility.GetIsDeptUser();
            this.location    = utility.GetLocation();
            this.department  = utility.GetDepartment();

            if (!this.isAdminUser && !this.isCMUser && !this.isDeptUser)
            {
                Response.Redirect(VariablesCashManager.NO_ACCESS_PAGE);
            }

            if (isDeptUser)
            {
                LabelCMPriority.Visible           = false;
                RadioButtonListCMPriority.Visible = false;

                if (this.location.Equals("All"))
                {
                    RadioButtonListLocation.Visible = true;
                    LabelLocation.Visible           = true;
                }
                else if (this.location.Equals("2"))
                {
                    RadioButtonListLocation.Visible = true;
                    LabelLocation.Visible           = true;
                    RadioButtonListLocation.Items.FindByValue("All").Attributes.Add("Style", "display: none");
                    RadioButtonListLocation.Items.FindByValue("1").Attributes.Add("Style", "display: none");
                }
                else
                {
                    LabelLocation.Visible           = false;
                    RadioButtonListLocation.Visible = false;
                }

                LabelPayFlag.Visible           = false;
                RadioButtonListPayFlag.Visible = false;

                LabelPaymentMethod.Visible           = false;
                RadioButtonListPaymentMethod.Visible = false;

                LabelDepartments.Visible       = false;
                CheckBoxDepartmentsAll.Visible = false;
            }

            if (isAdminUser || isCMUser)
            {
                RadioButtonListLocation.Visible = true;
                LabelLocation.Visible           = true;
            }
        }
        protected void SqlDataSource_Elite_uspBMcBEARCashFlowManager_Selecting(object sender, SqlDataSourceSelectingEventArgs e)
        {
            String inv   = "";
            String loc   = "";
            String dept  = "";
            String dp    = "";
            String cmp   = "";
            String pay   = "";
            String mthd  = "";
            String cur   = "";
            String src   = "";
            String ofc   = "";
            String vid   = "";
            String vname = "";
            String bc    = "";

            if (Request["inv"] != null)
            {
                inv = Request["inv"].ToString();
            }
            if (Request["bc"] != null)
            {
                bc = Request["bc"].ToString();
            }
            if (Request["loc"] != null)
            {
                loc = Request["loc"].ToString();
            }
            if (Request["dept"] != null)
            {
                dept = Request["dept"].ToString();
            }
            if (Request["dp"] != null)
            {
                dp = Request["dp"].ToString();
            }
            if (Request["cmp"] != null)
            {
                cmp = Request["cmp"].ToString();
            }
            if (Request["pay"] != null)
            {
                pay = Request["pay"].ToString();
            }
            if (Request["mthd"] != null)
            {
                mthd = Request["mthd"].ToString();
            }
            if (Request["cur"] != null)
            {
                cur = Request["cur"].ToString();
            }
            if (Request["src"] != null)
            {
                src = Request["src"].ToString();
            }
            if (Request["ofc"] != null)
            {
                ofc = Request["ofc"].ToString();
            }
            if (Request["vid"] != null)
            {
                vid = Request["vid"].ToString();
            }
            if (Request["vname"] != null)
            {
                vname = Request["vname"].ToString();
            }


            e.Command.CommandTimeout = 0;
            if (utility.GetIsDeptUser())
            {
                e.Command.Parameters.Add(new SqlParameter("@deptUser", "1"));
            }
            if (!utility.GetLocation().Equals("All") && !utility.GetLocation().Equals(""))
            {
                e.Command.Parameters.Add(new SqlParameter("@location", utility.GetLocation()));
            }
            if (!utility.GetDepartment().Equals("All") && !utility.GetDepartment().Equals(""))
            {
                e.Command.Parameters.Add(new SqlParameter("@department", utility.GetDepartment()));
            }
            if (!dp.Equals("All") && !dp.Equals(""))
            {
                e.Command.Parameters.Add(new SqlParameter("@deptPriority", dp));
            }
            if (!cmp.Equals("All") && !cmp.Equals(""))
            {
                e.Command.Parameters.Add(new SqlParameter("@cmPriority", cmp));
            }
            if (!pay.Equals("All") && !pay.Equals(""))
            {
                e.Command.Parameters.Add(new SqlParameter("@payFlag", pay));
            }
            if (!mthd.Equals("All") && !mthd.Equals(""))
            {
                e.Command.Parameters.Add(new SqlParameter("@paymentMethod", mthd));
            }
            if (!inv.Equals("All") && !inv.Equals(""))
            {
                e.Command.Parameters.Add(new SqlParameter("@invoiceNumber", inv));
            }
            if (!bc.Equals("All") && !bc.Equals(""))
            {
                e.Command.Parameters.Add(new SqlParameter("@barcode", bc));
            }
            if (!cur.Equals("All") && !cur.Equals(""))
            {
                e.Command.Parameters.Add(new SqlParameter("@currency", cur));
            }
            if (!src.Equals("All") && !src.Equals(""))
            {
                e.Command.Parameters.Add(new SqlParameter("@source", src));
            }
            if (!ofc.Equals("All") && !ofc.Equals(""))
            {
                e.Command.Parameters.Add(new SqlParameter("@office", ofc));
            }
            if (!vid.Equals("All") && !vid.Equals(""))
            {
                e.Command.Parameters.Add(new SqlParameter("@vendorId", vid));
            }
            if (!vname.Equals("All") && !vname.Equals(""))
            {
                e.Command.Parameters.Add(new SqlParameter("@vendorName", vname));
            }
        }