Esempio n. 1
0
 protected void DdlStatus_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (Session["emp"] != null)
     {
         Employee emp = (Employee)Session["emp"];
         if (ddlStatus.SelectedItem.ToString() == "Select Status")
         {
             gvRequisitionForm.DataSource = RequisitionControl.DisplayAllByDeptCode(emp.DeptCode);
             gvRequisitionForm.DataBind();
             ViewState["DataSource"] = "displayAll";
             showEmptyLabel();
         }
         else
         {
             string selectedStatus = ddlStatus.SelectedItem.ToString();
             gvRequisitionForm.DataSource = RequisitionControl.getRequisitionListByStatusAndDepCode(ddlStatus.SelectedItem.ToString(), emp.DeptCode);
             gvRequisitionForm.DataBind();
             ViewState["DataSource"] = "displayStatusSearch";
             showEmptyLabel();
         }
     }
     else
     {
         Utility.logout();
     }
 }
Esempio n. 2
0
    List <WCFRequisitionListItem> IRequisitionListService.getRequisitionListByStatusAndDept(string deptCode)
    {
        List <WCFRequisitionListItem> wlist = new List <WCFRequisitionListItem>();
        List <ReqisitionListItem>     rlist = RequisitionControl.getRequisitionListByStatusAndDepCode("Pending", deptCode);

        foreach (ReqisitionListItem r in rlist)
        {
            wlist.Add(WCFRequisitionListItem.Make(r.Date, r.RequisitionNo.ToString(), r.Department, r.Status, r.EmployeeName));
            //wlist.Add(WCFRequisitionListItem.Make(r.RequisitionNo.ToString(), r.Department, r.Status, r.EmployeeName, r.Date ));
        }
        return(wlist);
    }
Esempio n. 3
0
    protected void GvRequisitionForm_PageIndexChanging(object sender, GridViewPageEventArgs e)
    {
        Employee emp = (Employee)Session["emp"];

        gvRequisitionForm.PageIndex = e.NewPageIndex;
        if (((string)ViewState["DataSource"]).Equals("displayAll"))
        {
            gvRequisitionForm.DataSource = RequisitionControl.DisplayAllByDeptCode(emp.DeptCode);
        }
        else if (((string)ViewState["DataSource"]).Equals("displayStatusSearch"))
        {
            gvRequisitionForm.DataSource = RequisitionControl.getRequisitionListByStatusAndDepCode(ddlStatus.SelectedItem.ToString(), emp.DeptCode);
        }
        else if (((string)ViewState["DataSource"]).Equals("displaySearch"))
        {
            gvRequisitionForm.DataSource = RequisitionControl.HeadSearchWithoutStatus(((string)ViewState["searchString"]).Trim(), emp.DeptCode);
        }
        else if (((string)ViewState["DataSource"]).Equals("displaySearchStatus"))
        {
            gvRequisitionForm.DataSource = RequisitionControl.HeadSearchWithStatus(((string)ViewState["searchString"]).Trim(), emp.DeptCode, ddlStatus.SelectedItem.ToString());
        }
        gvRequisitionForm.DataBind();
    }