Exemple #1
0
    /// <summary>
    /// 获取监测任务列表信息
    /// </summary>
    /// <returns></returns>
    protected void selectTask()
    {
        string strSortname  = Request.Params["sortname"];
        string strSortorder = Request.Params["sortorder"];
        int    intPageIdx   = Convert.ToInt32(Request.Params["page"]);
        int    intPagesize  = Convert.ToInt32(Request.Params["pagesize"]);

        //构造查询对象
        TMisMonitorTaskVo    objTask      = new TMisMonitorTaskVo();
        TMisMonitorTaskLogic objTaskLogic = new TMisMonitorTaskLogic();

        if (strSortname == null || strSortname.Length == 0)
        {
            strSortname = TMisMonitorTaskVo.ID_FIELD;
        }

        //任务类型
        string strContractType = !string.IsNullOrEmpty(Request.QueryString["SrhContractType"]) ? Request.QueryString["SrhContractType"].ToString() : "";

        objTask.CONTRACT_TYPE = strContractType;
        objTask.SORT_FIELD    = strSortname;
        objTask.SORT_TYPE     = strSortorder;
        objTask.CONTRACT_ID   = !string.IsNullOrEmpty(Request.QueryString["contract_id"]) ? Request.QueryString["contract_id"].ToString() : "";

        string strJson = "";
        //int intTotalCount = objTaskLogic.GetSelectResultCount(objTask);//总计的数据条数
        DataTable dt = objTaskLogic.SelectByTable(objTask, 0, 0);

        strJson = CreateToJson(dt, dt.Rows.Count);

        Response.Write(strJson);
        Response.End();
    }
Exemple #2
0
    /// <summary>
    /// 获取监测任务列表信息
    /// </summary>
    /// <returns></returns>
    protected string getTaskInfoForJson()
    {
        string strSortname  = Request.Params["sortname"];
        string strSortorder = Request.Params["sortorder"];
        int    intPageIdx   = Convert.ToInt32(Request.Params["page"]);
        int    intPagesize  = Convert.ToInt32(Request.Params["pagesize"]);

        //构造查询对象
        TMisMonitorTaskVo    objTask      = new TMisMonitorTaskVo();
        TMisMonitorTaskLogic objTaskLogic = new TMisMonitorTaskLogic();

        if (strSortname == null || strSortname.Length == 0)
        {
            strSortname = TMisMonitorTaskVo.ID_FIELD;
        }

        objTask.SORT_FIELD  = strSortname;
        objTask.SORT_TYPE   = strSortorder;
        objTask.CONTRACT_ID = !string.IsNullOrEmpty(Request.QueryString["contract_id"]) ? Request.QueryString["contract_id"].ToString() : "";

        int       intTotalCount = objTaskLogic.GetSelectResultCount(objTask);//总计的数据条数
        DataTable dt            = objTaskLogic.SelectByTable(objTask, intPageIdx, intPagesize);

        return(CreateToJson(dt, intTotalCount));
    }
Exemple #3
0
    /// <summary>
    /// 获取监测任务列表信息
    /// </summary>
    /// <returns></returns>
    protected void selectTask()
    {
        string strSortname  = Request.Params["sortname"];
        string strSortorder = Request.Params["sortorder"];
        int    intPageIdx   = Convert.ToInt32(Request.Params["page"]);
        int    intPagesize  = Convert.ToInt32(Request.Params["pagesize"]);

        //任务单号
        string strTICKET_NUM = !string.IsNullOrEmpty(Request.QueryString["SrhTICKET_NUM"]) ? Request.QueryString["SrhTICKET_NUM"].ToString() : "";
        //项目名称
        string strProjectName = !string.IsNullOrEmpty(Request.QueryString["SrhProjectName"]) ? Request.QueryString["SrhProjectName"].ToString() : "";

        //构造查询对象
        TMisMonitorTaskVo    objTask      = new TMisMonitorTaskVo();
        TMisMonitorTaskLogic objTaskLogic = new TMisMonitorTaskLogic();

        if (strSortname == null || strSortname.Length == 0)
        {
            strSortname = TMisMonitorTaskVo.ID_FIELD;
        }

        //objTask.SORT_FIELD = strSortname;
        //objTask.SORT_TYPE = strSortorder;
        objTask.CONTRACT_TYPE = "07";
        objTask.SORT_FIELD    = "CREATE_DATE";
        objTask.SORT_TYPE     = "desc";
        //objTask.CONTRACT_YEAR = strYear;
        //objTask.CONTRACT_TYPE = strContractType;
        objTask.TICKET_NUM   = strTICKET_NUM;
        objTask.PROJECT_NAME = strProjectName;
        //objTask.CONTRACT_TYPE = contract_type;

        //string strJson = "";
        //int intTotalCount = objTaskLogic.GetSelectResultCount(objTask);//总计的数据条数
        //DataTable dt = objTaskLogic.SelectByTable(objTask, intPageIdx, intPagesize);

        //strJson = CreateToJson(dt, intTotalCount);


        DataTable dt            = objTaskLogic.SelectByTable(objTask, 0, 0);
        int       intTotalCount = dt.Rows.Count;
        //int intTotalCount = objContractLogic.GetSelectResultCountEx(objContract, strStatus);//总计的数据条数
        //DataTable dt = objContractLogic.SelectByTableEx(objContract, strStatus, intPageIdx, intPagesize);
        //string strJson = CreateToJson(dt, intTotalCount);

        //by lhm
        //int intTotalCount;
        //DataTable dt = objContractLogic.SelectByTable(objContract);

        var ccflowDt = CCFlowFacade.GetCCFLowStatus(this.LogInfo.UserInfo.USER_NAME, dt, null, intPageIdx, intPagesize, out intTotalCount);

        string strJson = CreateToJson(ccflowDt, intTotalCount);


        Response.Write(strJson);
        Response.End();
    }
    /// <summary>
    /// 获取监测任务列表信息
    /// </summary>
    /// <returns></returns>
    protected void selectTask()
    {
        string strSortname  = Request.Params["sortname"];
        string strSortorder = Request.Params["sortorder"];
        int    intPageIdx   = Convert.ToInt32(Request.Params["page"]);
        int    intPagesize  = Convert.ToInt32(Request.Params["pagesize"]);

        //委托年度
        string strYear = !string.IsNullOrEmpty(Request.QueryString["SrhYear"]) ? Request.QueryString["SrhYear"].ToString() : "";
        //委托类型
        string strContractType = !string.IsNullOrEmpty(Request.QueryString["SrhContractType"]) ? Request.QueryString["SrhContractType"].ToString() : "";
        //任务单号
        string strTICKET_NUM = !string.IsNullOrEmpty(Request.QueryString["SrhTICKET_NUM"]) ? Request.QueryString["SrhTICKET_NUM"].ToString() : "";
        //项目名称
        string strProjectName = !string.IsNullOrEmpty(Request.QueryString["SrhProjectName"]) ? Request.QueryString["SrhProjectName"].ToString() : "";

        //构造查询对象
        TMisMonitorTaskVo    objTask      = new TMisMonitorTaskVo();
        TMisMonitorTaskLogic objTaskLogic = new TMisMonitorTaskLogic();

        if (strSortname == null || strSortname.Length == 0)
        {
            strSortname = TMisMonitorTaskVo.ID_FIELD;
        }

        objTask.SORT_FIELD = "CREATE_DATE";
        objTask.SORT_TYPE  = "desc";
        //objTask.SORT_FIELD = strSortname;
        //objTask.SORT_TYPE = strSortorder;
        objTask.CONTRACT_YEAR = strYear;
        objTask.CONTRACT_TYPE = strContractType;
        objTask.TICKET_NUM    = strTICKET_NUM;
        objTask.PROJECT_NAME  = strProjectName;

        string    strJson       = "";
        int       intTotalCount = objTaskLogic.GetSelectResultCount(objTask);//总计的数据条数
        DataTable dt            = objTaskLogic.SelectByTable(objTask, intPageIdx, intPagesize);

        strJson = CreateToJson(dt, intTotalCount);

        Response.Write(strJson);
        Response.End();
    }