protected void ViewAdjustmentGV_PageIndexChanging(object sender, GridViewPageEventArgs e)
        {
            List <InventoryAdjustmentModel> itemList = (List <InventoryAdjustmentModel>)Session["ViewAdj"];

            ViewAdjustmentGV.PageIndex  = e.NewPageIndex;
            ViewAdjustmentGV.DataSource = itemList;
            ViewAdjustmentGV.DataBind();
        }
        //InventoryAdjustmentModel model;
        protected void Page_Load(object sender, EventArgs e)
        {
            context = new SSISEntities();

            if (!IsPostBack)
            {
                List <Inventory_Adjustment>     invAdjList   = context.Inventory_Adjustment.Where(x => x.deleted == "N" & x.status == "Pending").ToList();
                List <InventoryAdjustmentModel> invModelList = new List <InventoryAdjustmentModel>();
                foreach (Inventory_Adjustment i in invAdjList)
                {
                    InventoryAdjustmentModel model = new InventoryAdjustmentModel(i);
                    //model = new InventoryAdjustmentModel(i);
                    if (User.IsInRole("Manager"))
                    {
                        foreach (AdjustmentModel j in model.AdjModel)
                        {
                            if (j.Above250())
                            {
                                invModelList.Add(model);
                                break;
                            }
                        }
                    }
                    else if (User.IsInRole("Supervisor"))
                    {
                        foreach (AdjustmentModel j in model.AdjModel)
                        {
                            if (!j.Above250())
                            {
                                invModelList.Add(model);
                                break;
                            }
                        }
                    }
                }

                Session["ViewAdj"]          = invModelList;
                ViewAdjustmentGV.DataSource = invModelList;
                ViewAdjustmentGV.DataBind();

                //invModelList.Add(model);
                //GridView1.DataSource = invModelList;
                //GridView1.DataBind();
            }
            //List<Adjustment_Details> adjList = context.Adjustment_Details.ToList();
            //List<AdjustmentModel> detailList = new List<AdjustmentModel>();
            //foreach (Adjustment_Details i in adjList)
            //{
            //    AdjustmentModel model = new AdjustmentModel(i);
            //    detailList.Add(model);
            //}
            //Session["ViewAdj"] = detailList;
        }