/// <summary>
    /// 获得委托书信息
    /// </summary>
    protected void SelectContract()
    {
        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 strContractCode = !string.IsNullOrEmpty(Request.QueryString["SrhContractCode"]) ? Request.QueryString["SrhContractCode"].ToString() : "";
        //任务单号
        string strDutyCode = !string.IsNullOrEmpty(Request.QueryString["DutyCode"]) ? Request.QueryString["DutyCode"].ToString() : "";
        //报告号
        string strReportCode = !string.IsNullOrEmpty(Request.QueryString["ReportCode"]) ? Request.QueryString["ReportCode"].ToString() : "";
        //委托客户
        string strClientName = !string.IsNullOrEmpty(Request.QueryString["ClientName"]) ? Request.QueryString["ClientName"].ToString() : "";
        //合同类别
        string strItemType = !string.IsNullOrEmpty(Request.QueryString["ItemType"]) ? Request.QueryString["ItemType"].ToString() : "";
        //项目名称
        string strProjectName = !string.IsNullOrEmpty(Request.QueryString["SrhProjectName"]) ? Request.QueryString["SrhProjectName"].ToString() : "";

        //构造查询对象
        TMisContractVo    objContract      = new TMisContractVo();
        TMisContractLogic objContractLogic = new TMisContractLogic();

        if (strSortname == null || strSortname.Length == 0)
        {
            strSortname = TMisContractVo.CONTRACT_CODE_FIELD;
        }

        //objContract.SORT_FIELD = strSortname;
        //objContract.SORT_TYPE = strSortorder;
        objContract.SORT_FIELD        = "ID";
        objContract.SORT_TYPE         = "desc";
        objContract.CONTRACT_YEAR     = strYear;
        objContract.CONTRACT_TYPE     = "05";
        objContract.PROJECT_ID        = base.LogInfo.UserInfo.ID;
        objContract.CONTRACT_CODE     = strContractCode;
        objContract.PROJECT_NAME      = strProjectName;
        objContract.CLIENT_COMPANY_ID = strClientName;
        objContract.TEST_TYPE         = strItemType;


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

        string strJson = CreateToJson(dt, intTotalCount);

        Response.Write(strJson);
        Response.End();
    }
    /// <summary>
    /// 获得委托书信息
    /// </summary>
    protected string getContractInfo()
    {
        string strSortname  = Request.Params["sortname"];
        string strSortorder = Request.Params["sortorder"];
        int    intPageIdx   = Convert.ToInt32(Request.Params["page"]);
        int    intPagesize  = Convert.ToInt32(Request.Params["pagesize"]);

        //合同ID
        if (!string.IsNullOrEmpty(Request.QueryString["contract_id"]))
        {
            string strContractId = Request.QueryString["contract_id"].ToString();
            //委托年度
            string strYear = !string.IsNullOrEmpty(Request.QueryString["SrhYear"]) ? Request.QueryString["SrhYear"].ToString() : "";
            //委托类型
            string strContractType = !string.IsNullOrEmpty(Request.QueryString["SrhContractType"]) ? Request.QueryString["SrhContractType"].ToString() : "";
            //合同号
            string strContractCode = !string.IsNullOrEmpty(Request.QueryString["SrhContractCode"]) ? Request.QueryString["SrhContractCode"].ToString() : "";
            //任务单号
            string strDutyCode = !string.IsNullOrEmpty(Request.QueryString["DutyCode"]) ? Request.QueryString["DutyCode"].ToString() : "";
            //报告号
            string strReportCode = !string.IsNullOrEmpty(Request.QueryString["ReportCode"]) ? Request.QueryString["ReportCode"].ToString() : "";
            //委托客户
            string strClientName = !string.IsNullOrEmpty(Request.QueryString["ClientName"]) ? Request.QueryString["ClientName"].ToString() : "";
            //合同类别
            string strItemType = !string.IsNullOrEmpty(Request.QueryString["ItemType"]) ? Request.QueryString["ItemType"].ToString() : "";
            //项目名称
            string strProjectName = !string.IsNullOrEmpty(Request.QueryString["SrhProjectName"]) ? Request.QueryString["SrhProjectName"].ToString() : "";

            //构造查询对象
            TMisContractVo    objContract      = new TMisContractVo();
            TMisContractLogic objContractLogic = new TMisContractLogic();
            if (strSortname == null || strSortname.Length == 0)
            {
                strSortname = TMisContractVo.CONTRACT_CODE_FIELD;
            }

            objContract.ID                = strContractId;
            objContract.SORT_FIELD        = strSortname;
            objContract.SORT_TYPE         = strSortorder;
            objContract.CONTRACT_YEAR     = strYear;
            objContract.CONTRACT_TYPE     = strContractType;
            objContract.CONTRACT_CODE     = strContractCode;
            objContract.CLIENT_COMPANY_ID = strClientName;
            objContract.TEST_TYPE         = strItemType;
            objContract.PROJECT_NAME      = strProjectName;


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

            return(CreateToJson(dt, intTotalCount));
        }
        return("");
    }
예제 #3
0
    /// <summary>
    /// 获得委托书信息
    /// </summary>
    protected void SelectContract()
    {
        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 strContract_id = !string.IsNullOrEmpty(Request.QueryString["contract_id"]) ? Request.QueryString["contract_id"].ToString() : "";

        if (strContract_id.Trim().Length == 0)
        {
            Response.Write("");
            Response.End();
            return;
        }

        //构造查询对象
        TMisContractVo    objContract      = new TMisContractVo();
        TMisContractLogic objContractLogic = new TMisContractLogic();

        if (strSortname == null || strSortname.Length == 0)
        {
            strSortname = TMisContractVo.CONTRACT_CODE_FIELD;
        }

        objContract.SORT_FIELD = strSortname;
        objContract.SORT_TYPE  = strSortorder;
        objContract.ID         = strContract_id;

        //int intTotalCount = objContractLogic.GetSelectResultCount(objContract);//总计的数据条数
        DataTable dt = objContractLogic.SelectByTable(objContract, 0, 0);

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

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