protected void DdlStatusList_SelectedIndexChanged(object sender, EventArgs e)
        {
            // Retrieve the value currently selected in the dropdownlist
            string val = DdlStatusList.SelectedValue;

            // Populating the gridview according to the status specified in the dropdownlist
            if (val == "All")
            {
                GridViewReqList.DataSource = RequisitionLogic.ListAllRRBySpecificDept(DisbursementLogic.GetCurrentDep());
            }
            else if (val == "Approved")
            {
                GridViewReqList.DataSource = RequisitionLogic.ListAllRRBySpecificDeptAndStatus(DisbursementLogic.GetCurrentDep(), "Approved");
            }
            else if (val == "Processed")
            {
                GridViewReqList.DataSource = RequisitionLogic.ListAllRRBySpecificDeptAndStatus(DisbursementLogic.GetCurrentDep(), "Processed");
            }
            else if (val == "Rejected")
            {
                GridViewReqList.DataSource = RequisitionLogic.ListAllRRBySpecificDeptAndStatus(DisbursementLogic.GetCurrentDep(), "Rejected");
            }
            else
            {
                // Default list (aka 'Pending)
                GridViewReqList.DataSource = RequisitionLogic.ListAllRRBySpecificDeptAndStatus(DisbursementLogic.GetCurrentDep(), "Pending");
            }
            GridViewReqList.DataBind();
        }
Example #2
0
        // Populating main gridview
        protected void LoadData()
        {
            var temp = RequisitionLogic.ListCurrentRequisitionRecord();

            GridViewReqList.DataSource = temp;
            GridViewReqList.DataBind();
        }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         // Here we set 'Pending' as the default status of the page (for ease of the user)
         GridViewReqList.DataSource = RequisitionLogic.ListAllRRBySpecificDeptAndStatus(DisbursementLogic.GetCurrentDep(), "Pending");
         GridViewReqList.DataBind();
     }
 }
 // Populating selected dept in the main gridview
 protected void LoadDataByDept(string val)
 {
     GridViewReqList.DataSource = RequisitionLogic.ListPastRequisitionRecordsByDept(val);
     GridViewReqList.DataBind();
 }
 // Populating ALL main gridview
 protected void LoadAllData()
 {
     GridViewReqList.DataSource = RequisitionLogic.ListPastRequisitionRecord();
     GridViewReqList.DataBind();
 }