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

        uint uYearTerm = 20131401;

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

        if (IsPostBack)
        {
            vrParameter.dwYearTerm   = uYearTerm;
            vrParameter.dwReportStat = (uint)DEVLIST.DWREPORTSTAT.REPORTSTAT_ORIGINAL;
            uResponse = m_Request.Report.GetDevChg(vrParameter, out vrResult);
            {
                if (uResponse == REQUESTCODE.EXECUTE_SUCCESS && vrResult.dwYearTerm != null)
                {
                    DEVCHG tempChage = vrResult;
                    DEVCHG setValue  = new DEVCHG();
                    setValue.dwYearTerm     = uYearTerm;
                    setValue.dwReportStat   = (uint)DEVLIST.DWREPORTSTAT.REPORTSTAT_SAVE;
                    setValue.dwBDevNum      = vrResult.dwBDevNum;
                    setValue.dwBMoney       = vrResult.dwBMoney;
                    setValue.dwBBigDevNum   = vrResult.dwBBigDevNum;
                    setValue.dwBBigMoney    = vrResult.dwBBigMoney;
                    setValue.dwIncDevNum    = vrResult.dwIncDevNum;
                    setValue.dwIncMoney     = vrResult.dwIncMoney;
                    setValue.dwIncBigDevNum = vrResult.dwIncBigDevNum;
                    setValue.dwIncBigMoney  = vrResult.dwIncBigMoney;
                    setValue.dwEDevNum      = vrResult.dwEDevNum;
                    setValue.dwEMoney       = vrResult.dwEMoney;
                    setValue.dwEBigDevNum   = vrResult.dwEBigDevNum;
                    setValue.dwEBigMoney    = vrResult.dwEBigMoney;
                    setValue.dwDecBigDevNum = vrResult.dwDecBigDevNum;
                    setValue.dwDecBigMoney  = vrResult.dwDecBigMoney;
                    setValue.dwDecDevNum    = vrResult.dwDecDevNum;
                    setValue.dwDecMoney     = vrResult.dwDecMoney;
                    uResponse = m_Request.Report.SetDevChg(setValue);
                }
            }
        }

        vrParameter.dwYearTerm   = uYearTerm;
        vrParameter.dwReportStat = (uint)DEVLIST.DWREPORTSTAT.REPORTSTAT_SAVE;
        uResponse = m_Request.Report.GetDevChg(vrParameter, out vrResult);
        if (uResponse == REQUESTCODE.EXECUTE_SUCCESS && vrResult.dwYearTerm == null)
        {
            vrParameter.dwReportStat = (uint)DEVLIST.DWREPORTSTAT.REPORTSTAT_DEPLOY;
            vrParameter.dwYearTerm   = uYearTerm;
            uResponse = m_Request.Report.GetDevChg(vrParameter, out vrResult);
            if (uResponse == REQUESTCODE.EXECUTE_SUCCESS && vrResult.dwYearTerm == null)
            {
                vrParameter.dwYearTerm   = uYearTerm;
                vrParameter.dwReportStat = (uint)DEVLIST.DWREPORTSTAT.REPORTSTAT_DEPLOY;
                uResponse = m_Request.Report.GetDevChg(vrParameter, out vrResult);
                {
                    if (uResponse == REQUESTCODE.EXECUTE_SUCCESS && vrResult.dwYearTerm != null)
                    {
                        DEVCHG tempChage = vrResult;
                        DEVCHG setValue  = new DEVCHG();
                        setValue.dwYearTerm     = uYearTerm;
                        setValue.dwReportStat   = (uint)DEVLIST.DWREPORTSTAT.REPORTSTAT_SAVE;
                        setValue.dwBDevNum      = vrResult.dwBDevNum;
                        setValue.dwBMoney       = vrResult.dwBMoney;
                        setValue.dwBBigDevNum   = vrResult.dwBBigDevNum;
                        setValue.dwBBigMoney    = vrResult.dwBBigMoney;
                        setValue.dwIncDevNum    = vrResult.dwIncDevNum;
                        setValue.dwIncMoney     = vrResult.dwIncMoney;
                        setValue.dwIncBigDevNum = vrResult.dwIncBigDevNum;
                        setValue.dwIncBigMoney  = vrResult.dwIncBigMoney;
                        setValue.dwEDevNum      = vrResult.dwEDevNum;
                        setValue.dwEMoney       = vrResult.dwEMoney;
                        setValue.dwEBigDevNum   = vrResult.dwEBigDevNum;
                        setValue.dwEBigMoney    = vrResult.dwEBigMoney;
                        setValue.dwDecBigDevNum = vrResult.dwDecBigDevNum;
                        setValue.dwDecBigMoney  = vrResult.dwDecBigMoney;
                        setValue.dwDecDevNum    = vrResult.dwDecDevNum;
                        setValue.dwDecMoney     = vrResult.dwDecMoney;
                        uResponse = m_Request.Report.SetDevChg(setValue);
                    }
                }
            }
        }

        vrParameter.dwYearTerm   = uYearTerm;
        vrParameter.dwReportStat = (uint)DEVLIST.DWREPORTSTAT.REPORTSTAT_ORIGINAL;
        uResponse = m_Request.Report.GetDevChg(vrParameter, out vrResult);
        if (uResponse == REQUESTCODE.EXECUTE_SUCCESS && vrResult.dwYearTerm != null)
        {
            for (int i = 0; i < 1; i++)
            {
                m_szOut += "<tr>";
                m_szOut += "<td>" + ConfigConst.GCSchoolCode.ToString() + "</td>";
                m_szOut += "<td>" + vrResult.dwBDevNum.ToString() + "</td>";
                m_szOut += "<td>" + ((uint)vrResult.dwBMoney) + "</td>";
                m_szOut += "<td>" + vrResult.dwBBigDevNum.ToString() + "</td>";
                m_szOut += "<td>" + ((uint)vrResult.dwBBigMoney) + "</td>";
                m_szOut += "<td>" + vrResult.dwIncDevNum.ToString() + "</td>";
                m_szOut += "<td>" + ((uint)vrResult.dwIncMoney) + "</td>";
                m_szOut += "<td>" + vrResult.dwDecDevNum.ToString() + "</td>";
                m_szOut += "<td>" + ((uint)vrResult.dwDecMoney) + "</td>";
                m_szOut += "<td>" + vrResult.dwEDevNum.ToString() + "</td>";
                m_szOut += "<td>" + ((uint)vrResult.dwEMoney) + "</td>";
                m_szOut += "<td>" + vrResult.dwEBigDevNum.ToString() + "</td>";
                m_szOut += "<td>" + ((uint)vrResult.dwEBigMoney) + "</td>";
                m_szOut += "</tr>";
            }
        }
        UpdatePageCtrl(m_Request.Report);


        PutBackValue();
    }
Exemplo n.º 2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        REQUESTCODE uResponse   = REQUESTCODE.EXECUTE_FAIL;
        DEVCHGREQ   vrParameter = new DEVCHGREQ();

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

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

            if (uResponse == REQUESTCODE.EXECUTE_SUCCESS && vrResult.dwYearTerm != null)
            {
                DEVCHG setValue2 = vrResult;
                setValue2.dwReportStat = (uint)DEVLIST.DWREPORTSTAT.REPORTSTAT_DEPLOY;
                m_Request.Report.SetDevChg(setValue2);
            }
        }
        if (IsPostBack && szValue != null && szValue != "" && opSub != "1")
        {
            // szValue = szValue.Substring(0, szValue.Length - 1);
            //szValue = "[" + szValue + "]";

            DEVCHG2 vrResult2 = (DEVCHG2)JsonConvert.DeserializeObject(szValue, typeof(DEVCHG2));

            DEVCHG setValue = new DEVCHG();
            setValue.dwYearTerm     = uYearTerm;
            setValue.dwReportStat   = (uint)DEVLIST.DWREPORTSTAT.REPORTSTAT_SAVE;
            setValue.dwBDevNum      = vrResult2.dwBDevNum == 0?null:(uint?)vrResult2.dwBDevNum;
            setValue.dwBMoney       = vrResult2.dwBMoney == 0 ? null : (uint?)vrResult2.dwBMoney;
            setValue.dwBBigDevNum   = vrResult2.dwBBigDevNum == 0 ? null : (uint?)vrResult2.dwBBigDevNum;
            setValue.dwBBigMoney    = vrResult2.dwBBigMoney == 0 ? null : (uint?)vrResult2.dwBBigMoney;
            setValue.dwIncDevNum    = vrResult2.dwIncDevNum == 0 ? null : (uint?)vrResult2.dwIncDevNum;
            setValue.dwIncMoney     = vrResult2.dwIncMoney == 0 ? null : (uint?)vrResult2.dwIncMoney;
            setValue.dwIncBigDevNum = vrResult2.dwIncBigDevNum == 0 ? null : (uint?)vrResult2.dwIncBigDevNum;
            setValue.dwIncBigMoney  = vrResult2.dwIncBigMoney == 0 ? null : (uint?)vrResult2.dwIncBigMoney;
            setValue.dwEDevNum      = vrResult2.dwEDevNum == 0 ? null : (uint?)vrResult2.dwEDevNum;
            setValue.dwEMoney       = vrResult2.dwEMoney == 0 ? null : (uint?)vrResult2.dwEMoney;
            setValue.dwEBigDevNum   = vrResult2.dwEBigDevNum == 0 ? null : (uint?)vrResult2.dwEBigDevNum;
            setValue.dwEBigMoney    = vrResult2.dwEBigMoney == 0 ? null : (uint?)vrResult2.dwEBigMoney;
            setValue.dwDecBigDevNum = vrResult2.dwDecBigDevNum == 0 ? null : (uint?)vrResult2.dwDecBigDevNum;
            setValue.dwDecBigMoney  = vrResult2.dwDecBigMoney == 0 ? null : (uint?)vrResult2.dwDecBigMoney;
            setValue.dwDecDevNum    = vrResult2.dwDecDevNum == 0 ? null : (uint?)vrResult2.dwDecDevNum;
            setValue.dwDecMoney     = vrResult2.dwDecMoney == 0 ? null : (uint?)vrResult2.dwDecMoney;
            uResponse = m_Request.Report.SetDevChg(setValue);
        }


        vrParameter.dwYearTerm   = uYearTerm;
        vrParameter.dwReportStat = (uint)DEVLIST.DWREPORTSTAT.REPORTSTAT_SAVE;
        uResponse = m_Request.Report.GetDevChg(vrParameter, out vrResult);
        if (uResponse == REQUESTCODE.EXECUTE_SUCCESS && vrResult.dwYearTerm != null)
        {
            for (int i = 0; i < 1; i++)
            {
                m_szOut += "<tr>";
                m_szOut += "<td>" + ConfigConst.GCSchoolCode.ToString() + "</td>";
                m_szOut += "<td class='tdSet' data-type='dwBDevNum'>" + vrResult.dwBDevNum.ToString() + "</td>";
                m_szOut += "<td class='tdSet' data-type='dwBMoney'>" + ((uint)vrResult.dwBMoney) + "</td>";
                m_szOut += "<td class='tdSet' data-type='dwBBigDevNum'>" + vrResult.dwBBigDevNum.ToString() + "</td>";
                m_szOut += "<td class='tdSet' data-type='dwBBigMoney'>" + ((uint)vrResult.dwBBigMoney) + "</td>";
                m_szOut += "<td class='tdSet' data-type='dwIncDevNum'>" + vrResult.dwIncDevNum.ToString() + "</td>";
                m_szOut += "<td class='tdSet' data-type='dwIncMoney'>" + ((uint)vrResult.dwIncMoney) + "</td>";
                m_szOut += "<td class='tdSet' data-type='dwDecDevNum'>" + vrResult.dwDecDevNum.ToString() + "</td>";
                m_szOut += "<td class='tdSet' data-type='dwDecMoney'>" + ((uint)vrResult.dwDecMoney) + "</td>";
                m_szOut += "<td class='tdSet' data-type='dwEDevNum'>" + vrResult.dwEDevNum.ToString() + "</td>";
                m_szOut += "<td class='tdSet' data-type='dwEMoney'>" + ((uint)vrResult.dwEMoney) + "</td>";
                m_szOut += "<td class='tdSet' data-type='dwEBigDevNum'>" + vrResult.dwEBigDevNum.ToString() + "</td>";
                m_szOut += "<td class='tdSet' data-type='dwEBigMoney'>" + ((uint)vrResult.dwEBigMoney) + "</td>";
                m_szOut += "</tr>";
            }
        }
        UpdatePageCtrl(m_Request.Report);


        PutBackValue();
    }