Beispiel #1
0
        private string SetReportParameters(
            string operationNumber, PmrCycleModel tcmCycleModel, int resultsMatrixId)
        {
            int operationID = _ClientForGenericReports
                              .GetOperationIDParentForOperationNumber(operationNumber);

            string parameters = OPERATION + "=" + operationID;

            parameters += "&" + CYCLE + "=" + tcmCycleModel.PmrCycleId;
            parameters += "&" + LANG + "=" + _lang;

            return(parameters);
        }
Beispiel #2
0
        public virtual ActionResult GetTCMReport(
            string operationNumber, int resultsMatrixId, string type)
        {
            PmrCycleModel tcmCycleModel = _ClientPMRForCycleModel.GetPMRCycle(_lang, resultsMatrixId);

            string parameters = SetReportParameters(operationNumber, tcmCycleModel, resultsMatrixId);

            string reportServer = ConfigurationManager.AppSettings["ParamReportServer"];
            string report       = ConfigurationManager.AppSettings["ParamForTCMReport"];

            string url = reportServer + report;

            url += "&" + parameters + "&rs:Format=" + FORMAT + "&rs:ClearSession=true";

            return(Redirect(url));
        }
Beispiel #3
0
        public virtual ActionResult Edit(ResultsMatrixModel resultModel)
        {
            int           code     = 0;
            PmrCycleModel pmrModel = _clientResultsMatrix.GetPmrCycle(resultModel);

            resultModel.Operation = _clientResultsMatrix.FindOneOperationModel(
                new OperationSpecification()
            {
                OperationId = resultModel.OperationId
            });

            List <ImpactModel> impacts = resultModel.Impacts;

            resultModel.PmrCycle        = pmrModel;
            resultModel.ValidationStage = _clientResultsMatrix.FindOneConvergenceMasterDataModel(
                new ConvergenceMasterDataSpecification()
            {
                ConvergenceMasterDataId = resultModel.ValidationStageId
            });

            try
            {
                _clientResultsMatrix.Save(resultModel, IDBContext.Current.UserName);
                code = 501;

                _cacheData.Remove(_impactsCacheName, System.Web.Caching.CacheItemRemovedReason.Removed);
            }
            catch (Exception)
            {
                code = 499;
            }

            return(RedirectToAction(
                       "Index",
                       "Impacts",
                       new
            {
                operationNumber = resultModel.Operation.OperationNumber,
                state = code,
                filter = resultModel.filter
            }));
        }
Beispiel #4
0
 private string GetReportFileName(string operationNumber, PmrCycleModel tcmCycleModel)
 {
     return(string.Format(
                "{0} {1}{2}", operationNumber, tcmCycleModel.PmrCycleName, EXCEL_EXTENSION));
 }