コード例 #1
0
    public ENVIClass_Result CloseWFAPI(ENVIClass_ENVI dataENVI)
    {
        ENVIClass_Result result = new ENVIClass_Result();

        if (new ENVIService().Login(dataENVI.Username, dataENVI.Password, "ALL"))
        {
            if (!string.IsNullOrEmpty(dataENVI.CompanyCode) && !string.IsNullOrEmpty(dataENVI.FacilityCode) && !string.IsNullOrEmpty(dataENVI.IndicatorCode) && dataENVI.Year > 0 && dataENVI.Quarter > 0)
            {
                API_ENVI.ENVIWorkFlow.ENVIWorkFlow API = new API_ENVI.ENVIWorkFlow.ENVIWorkFlow();
                result = API.Workflow_PTTApproveL4(dataENVI);
                SystemFunction.SaveXML_UpdateStatus(dataENVI);
                SystemFunction.SaveXML_EPIResult(result);
            }
            else
            {
                result.IsCompleted = false;
                result.Message     = "Invalid Required Parameter: CompanyCode, FacilityCode, IndicatorCode, Year, Quarter";
            }
        }
        else
        {
            result.IsCompleted = false;
            result.Message     = "Login Failed";
        }
        return(result);
    }