protected void LineManagees_SelectedIndexChanged(object sender, EventArgs e)
        {
            LMName.InnerHtml = LineManagees.SelectedItem.ToString();
            ERS.BAL.Reviews rev = new ERS.BAL.Reviews();

            int lCategoryID = rev.GetCategoryID("Director");
            int LMIDWhoisOn = Int32.Parse(Request.QueryString["LMID"]);
            int EmpID = Int32.Parse(LineManagees.SelectedValue);
            int DirectorID = Int32.Parse(Session["UserId"].ToString());
            int ReviewID = rev.GetReviewID(LMIDWhoisOn , DirectorID , EmpID );
            if (ReviewID != -1)
            {
                ERS.ReviewInfo RevInfo = rev.GetReviewInfo(ReviewID, lCategoryID);
                if (RevInfo != null)
                {
                    CommentsTxt.Text = RevInfo.Comments;
                    RatingsTxt.Text = RevInfo.Rating.ToString();
                }
            }
            else
            {
                CommentsTxt.Text = "";
                RatingsTxt.Text = "";
            }

               // ERS.BAL.Reviews rev = new ERS.BAL.Reviews();
            List<ERS.DAL.EmpWithRevInfo_Cat> Source = rev.GetAllReviewsOf_Peer_GivenCategory(Int32.Parse(LineManagees.SelectedValue), Int32.Parse(ViewState["SelCatID"].ToString()));
            AllReviews.DataSource = Source;
            AllReviews.DataBind();
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            Response.Cache.SetCacheability(HttpCacheability.NoCache);

            if (Session["UserId"] == null)
               Response.Redirect("Default.aspx");
            if (!IsPostBack)
            {
                ViewState["PreviousPageUrl"] = Request.UrlReferrer.ToString();
                int DirectorID;
                if (Session["UserId"] != null)
                    DirectorID = Int32.Parse(Session["UserId"].ToString());
                else
                    Response.Redirect("Default.aspx");
                // Check if this person is valid

                int LMID = Int32.Parse(Request.QueryString["LMID"]);

                ERS.BAL.Director Dir = new ERS.BAL.Director();
                ERS.BAL.Reviews rev = new ERS.BAL.Reviews();

                List<ERS.ReviewCategory> Source = rev.GetAllCategories();
                Categories.DataSource = Source;
                Categories.DataBind();

                LineManagees.DataSource = Dir.GetManagees(LMID); ;
                LineManagees.DataTextField = "Name";
                LineManagees.DataValueField = "EmpID";
                LineManagees.DataBind();

                if (ViewState["SelCatID"] == null)
                    ViewState["SelCatID"] = Source.First().CategoryID;
                System.Web.UI.HtmlControls.HtmlGenericControl LI2 = (System.Web.UI.HtmlControls.HtmlGenericControl)Categories.Items[0].FindControl("CatLI");
                                LI2.Attributes["class"] = "active";

                AllReviews.DataSource = rev.GetAllReviewsOf_Peer_GivenCategory(Int32.Parse(LineManagees.SelectedValue), Int32.Parse(ViewState["SelCatID"].ToString())); ;
                AllReviews.DataBind();
                LMName.InnerHtml = LineManagees.SelectedItem.ToString();

                int lCategoryID = rev.GetCategoryID("Director");
                int LMIDWhoisOn = Int32.Parse(Request.QueryString["LMID"]);
                int EmpID = Int32.Parse(LineManagees.SelectedValue);
                 DirectorID = Int32.Parse(Session["UserId"].ToString());
                int ReviewID = rev.GetReviewID(LMIDWhoisOn, DirectorID, EmpID);
                if (ReviewID != -1)
                {
                    ERS.ReviewInfo RevInfo = rev.GetReviewInfo(ReviewID, lCategoryID);
                    if (RevInfo != null)
                    {
                        CommentsTxt.Text = RevInfo.Comments;
                        RatingsTxt.Text = RevInfo.Rating.ToString();
                    }

                }
            }
        }