private void BindGrid()
    {
        DataTable dt = EWF_Task_JobBLL.GetJobToDecision(int.Parse(Session["UserID"].ToString()));

        string condition = " 1 = 1 ";

        if (ddl_App.SelectedValue != "0")
        {
            condition += " AND App = '" + ddl_App.SelectedValue + "'";
        }
        if (tbx_MessageSubject.Text != "")
        {
            condition += " AND (Title like '%" + tbx_MessageSubject.Text + "%' OR MessageSubject like '%" + tbx_MessageSubject.Text + "%')";
        }

        #region 判断当前可查询的范围
        string orgcitys = "";
        if (tr_OrganizeCity.SelectValue != "1" && tr_OrganizeCity.SelectValue != "0")
        {
            Addr_OrganizeCityBLL orgcity = new Addr_OrganizeCityBLL(int.Parse(tr_OrganizeCity.SelectValue), true);
            orgcitys = orgcity.GetAllChildNodeIDs();
            if (orgcitys != "")
            {
                orgcitys += ",";
            }
            orgcitys += tr_OrganizeCity.SelectValue;

            condition += " AND OrganizeCity IN (" + orgcitys + ")";
        }
        #endregion

        if (tbx_InitiatorStaffName.Text != "")
        {
            condition += " AND ApplyStaffName LIKE '%" + tbx_InitiatorStaffName.Text + "%'";
        }
        string CantApproveAlone_EWF = ConfigHelper.GetConfigString("CantApproveAlone_EWF");
        if (!string.IsNullOrEmpty(CantApproveAlone_EWF))
        {
            condition += " AND AppCode NOT IN (" + CantApproveAlone_EWF + ")";
        }
        dt.DefaultView.RowFilter = condition;
        dt.DefaultView.Sort      = " TaskID desc ";
        gv_List.DataSource       = dt.DefaultView;
        gv_List.TotalRecordCount = dt.DefaultView.Count;
        gv_List.PageIndex        = (int)ViewState["PageIndex"];
        gv_List.DataBind();
        cb_SelectAll.Checked = false;
    }
Esempio n. 2
0
    private void BindDession()
    {
        GetEWFCount();

        DataTable dt        = EWF_Task_JobBLL.GetJobToDecision(int.Parse(Session["UserID"].ToString()));
        string    condition = ConfigHelper.GetConfigString("Desktop_EWF_GetDessionCondition");

        if (!string.IsNullOrEmpty(condition))
        {
            dt.DefaultView.RowFilter = condition;
        }

        gv_Decission.DataSource = dt.DefaultView;
        gv_Decission.DataBind();

        hy_ApproveFeeApplySummary.Visible = dt.Select("AppCode Like 'FNA_FeeApplyFlow%'").Length > 0;
    }
    private string GetNeedMeApproveTaskIDs()
    {
        string taskids = "";

        DataTable dt = EWF_Task_JobBLL.GetJobToDecision(int.Parse(Session["UserID"].ToString()));

        dt.DefaultView.RowFilter = "AppCode='FNA_FeeWriteoffFlow'";
        if (dt.DefaultView.Count == 0)
        {
            return("");
        }

        for (int i = 0; i < dt.DefaultView.Count; i++)
        {
            taskids += dt.DefaultView[i]["TaskID"].ToString() + ",";
        }

        if (taskids.EndsWith(","))
        {
            taskids = taskids.Substring(0, taskids.Length - 1);
        }

        return(taskids);
    }