Exemplo n.º 1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        REQUESTCODE   uResponse   = REQUESTCODE.EXECUTE_FAIL;
        LABALLCOSTREQ vrParameter = new LABALLCOSTREQ();
        uint          uYearTerm   = 20131401;

        if ((((ADMINLOGINRES)Session["LoginResult"]).dwManRole & (uint)ADMINLOGINRES.DWMANROLE.MANROLE_LEADER) > 0)
        {
            bLeader = true;
        }
        LABALLCOST vrResult;


        vrParameter.dwReportStat = (uint)DEVLIST.DWREPORTSTAT.REPORTSTAT_DEPLOY;
        vrParameter.dwYearTerm   = uYearTerm;
        uResponse = m_Request.Report.GetLabAllCost(vrParameter, out vrResult);
        if (uResponse == REQUESTCODE.EXECUTE_SUCCESS)
        {
            m_szOut += "<tr>";
            m_szOut += "<td>" + ConfigConst.GCSchoolCode.ToString() + "</td>";
            m_szOut += "<td>" + vrResult.dwLabNum.ToString() + "</td>";
            m_szOut += "<td>" + vrResult.dwLabArea.ToString() + "</td>";
            m_szOut += "<td>" + vrResult.dwTotalCost.ToString() + "</td>";
            m_szOut += "<td>" + (vrResult.dwBuyCost) + "</td>";
            m_szOut += "<td>" + (vrResult.dwTBuyCost) + "</td>";
            m_szOut += "<td>" + (vrResult.dwKeepCost) + "</td>";
            m_szOut += "<td>" + (vrResult.dwTKeepCost) + "</td>";
            m_szOut += "<td>" + (vrResult.dwRunCost) + "</td>";
            m_szOut += "<td>" + (vrResult.dwCRunCost) + "</td>";
            m_szOut += "<td>" + (vrResult.dwBuildCost) + "</td>";
            m_szOut += "<td>" + (vrResult.dwRAndRCost) + "</td>";
            m_szOut += "<td>" + (vrResult.dwOtherCost) + "</td>";
            m_szOut += "</tr>";
        }
        PutBackValue();
    }
Exemplo n.º 2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        REQUESTCODE   uResponse   = REQUESTCODE.EXECUTE_FAIL;
        LABALLCOSTREQ vrParameter = new LABALLCOSTREQ();
        uint          uYearTerm   = 20131401;

        if ((((ADMINLOGINRES)Session["LoginResult"]).dwManRole & (uint)ADMINLOGINRES.DWMANROLE.MANROLE_LEADER) > 0)
        {
            bLeader = true;
        }
        LABALLCOST vrResult;
        string     opSub = Request["opSub"];

        if (IsPostBack && opSub == "1")
        {
            vrParameter.dwReportStat = (uint)DEVLIST.DWREPORTSTAT.REPORTSTAT_SAVE;
            vrParameter.dwYearTerm   = uYearTerm;
            uResponse = m_Request.Report.GetLabAllCost(vrParameter, out vrResult);

            if (uResponse == REQUESTCODE.EXECUTE_SUCCESS && vrResult.dwLabNum != null)
            {
                LABALLCOST setValue2 = vrResult;
                setValue2.dwReportStat = (uint)DEVLIST.DWREPORTSTAT.REPORTSTAT_DEPLOY;
                m_Request.Report.SetLabAllCost(setValue2);
            }
        }
        if (IsPostBack && opSub != "1")
        {
            string szValue = Request["changeInfo"];
            if (IsPostBack && szValue != "")
            {
                szValue = "[" + szValue + "]";
                List <LABALLCOST> devlist = JsonConvert.DeserializeObject <List <LABALLCOST> >(szValue);
                for (int i = 0; i < devlist.Count; i++)
                {
                    LABALLCOST tempValue = devlist[i];
                    LABALLCOST setValue  = (LABALLCOST)SetEmpty0ToNull <LABALLCOST>(tempValue);
                    setValue.dwReportStat = (uint)DEVLIST.DWREPORTSTAT.REPORTSTAT_SAVE;
                    setValue.dwYearTerm   = uYearTerm;
                    uResponse             = m_Request.Report.SetLabAllCost(setValue);
                }
            }
        }
        vrParameter.dwReportStat = (uint)DEVLIST.DWREPORTSTAT.REPORTSTAT_SAVE;
        vrParameter.dwYearTerm   = uYearTerm;
        uResponse = m_Request.Report.GetLabAllCost(vrParameter, out vrResult);
        if (uResponse == REQUESTCODE.EXECUTE_SUCCESS && vrResult.dwLabNum != null)
        {
            m_szOut += "<tr>";
            m_szOut += "<td >" + ConfigConst.GCSchoolCode.ToString() + "</td>";
            m_szOut += "<td class='tdSet' data-type='dwLabNum'>" + vrResult.dwLabNum.ToString() + "</td>";
            m_szOut += "<td class='tdSet' data-type='dwLabArea'>" + vrResult.dwLabArea.ToString() + "</td>";
            m_szOut += "<td class='tdSet' data-type='dwTotalCost'>" + vrResult.dwTotalCost.ToString() + "</td>";
            m_szOut += "<td class='tdSet' data-type='dwBuyCost'>" + (vrResult.dwBuyCost) + "</td>";
            m_szOut += "<td class='tdSet' data-type='dwTBuyCost'>" + (vrResult.dwTBuyCost) + "</td>";
            m_szOut += "<td class='tdSet' data-type='dwKeepCost'>" + (vrResult.dwKeepCost) + "</td>";
            m_szOut += "<td class='tdSet' data-type='dwTKeepCost'>" + (vrResult.dwTKeepCost) + "</td>";
            m_szOut += "<td class='tdSet' data-type='dwRunCost'>" + (vrResult.dwRunCost) + "</td>";
            m_szOut += "<td class='tdSet' data-type='dwCRunCost'>" + (vrResult.dwCRunCost) + "</td>";
            m_szOut += "<td class='tdSet' data-type='dwBuildCost'>" + (vrResult.dwBuildCost) + "</td>";
            m_szOut += "<td class='tdSet' data-type='dwRAndRCost'>" + (vrResult.dwRAndRCost) + "</td>";
            m_szOut += "<td class='tdSet' data-type='dwOtherCost'>" + (vrResult.dwOtherCost) + "</td>";
            m_szOut += "</tr>";
        }
        PutBackValue();
    }