protected void BtnDisplayAll_Click(object sender, EventArgs e)
 {
     if (Session["emp"] != null)
     {
         Employee emp = (Employee)Session["emp"];
         gvCollectionList.DataSource = RequisitionControl.getCollectionList(emp.DeptCode);
         gvCollectionList.DataBind();
         ViewState["DataSource"] = "displayAll";
         showEmptyLabel();
     }
     else
     {
         Utility.logout();
     }
 }
    protected void GVCollectionList_PageIndexChanging(object sender, GridViewPageEventArgs e)
    {
        Employee emp = (Employee)Session["emp"];

        gvCollectionList.PageIndex = e.NewPageIndex;
        if (((string)ViewState["DataSource"]).Equals("displayAll"))
        {
            gvCollectionList.DataSource = RequisitionControl.getCollectionList(emp.DeptCode);
        }
        else
        {
            gvCollectionList.DataSource = RequisitionControl.DisplayCollectionListSearch(emp.DeptCode, ((string)ViewState["searchWord"]).Trim());
        }
        gvCollectionList.DataBind();
    }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         if (Session["emp"] != null)
         {
             emp = (Employee)Session["emp"];
             //Approved requisition
             gvCollectionList.DataSource = RequisitionControl.getCollectionList(emp.DeptCode);
             gvCollectionList.DataBind();
             ViewState["DataSource"] = "displayAll";
             showEmptyLabel();
         }
         else
         {
             Utility.logout();
         }
     }
 }