Exemple #1
0
        /// <summary>
        /// update stage of point file
        /// neo 2011-01-17
        /// </summary>
        /// <param name="bComplete">true or false</param>
        /// <param name="sCompletedDate">if bComplete=true, sCompletedDate=DateTime.ToString() else string.Empty</param>
        /// <param name="iLoanID"></param>
        /// <param name="iLoginUserID"></param>
        /// <param name="sLoanStage"></param>
        /// <returns>error, if success, error=string.Empty</returns>
        private static string UpdatePointFileStage(bool bComplete, string sCompletedDate, int iLoanID, int iLoginUserID, string sLoanStage, int iLoanStageId)
        {
            string sError = string.Empty;

            try
            {
                ServiceManager sm = new ServiceManager();
                using (LP2ServiceClient service = sm.StartServiceClient())
                {
                    UpdateStageRequest req = new UpdateStageRequest();
                    req.hdr        = new ReqHdr();
                    req.FileId     = iLoanID;
                    req.hdr.UserId = iLoginUserID;
                    StageInfo StageInfo1 = new StageInfo();
                    StageInfo1.StageName   = sLoanStage;
                    StageInfo1.LoanStageId = iLoanStageId;
                    DateTime completionDate = DateTime.MinValue;
                    if (bComplete == true)
                    {
                        DateTime.TryParse(sCompletedDate, out completionDate);
                    }
                    StageInfo1.Completed = completionDate;

                    req.StageList = new StageInfo[1] {
                        StageInfo1
                    };
                    UpdateStageResponse resp = service.UpdateStage(req);
                    bool bIsSuccess          = resp.hdr.Successful;
                    if (bIsSuccess == false)
                    {
                        sError = resp.hdr.StatusInfo;
                    }
                }
            }
            catch (System.ServiceModel.EndpointNotFoundException ee)
            {
                sError = " failed to update stage date in Point, reason: Point Manager is not running.";
            }
            catch (Exception ex)
            {
                sError = " failed to update stage date in Point, reason:" + ex.Message;
            }

            return(sError);
        }
Exemple #2
0
        /// <summary>
        /// Unmarshaller the response from the service to the response class.
        /// </summary>
        /// <param name="context"></param>
        /// <returns></returns>
        public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
        {
            UpdateStageResponse response = new UpdateStageResponse();

            context.Read();
            int targetDepth = context.CurrentDepth;

            while (context.ReadAtDepth(targetDepth))
            {
                if (context.TestExpression("Stage", targetDepth))
                {
                    var unmarshaller = StageDetailsUnmarshaller.Instance;
                    response.Stage = unmarshaller.Unmarshall(context);
                    continue;
                }
            }

            return(response);
        }
Exemple #3
0
        /// <summary>
        /// Unmarshaller the response from the service to the response class.
        /// </summary>
        /// <param name="context"></param>
        /// <returns></returns>
        public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
        {
            UpdateStageResponse response = new UpdateStageResponse();

            context.Read();
            int targetDepth = context.CurrentDepth;

            while (context.ReadAtDepth(targetDepth))
            {
                if (context.TestExpression("accessLogSettings", targetDepth))
                {
                    var unmarshaller = AccessLogSettingsUnmarshaller.Instance;
                    response.AccessLogSettings = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("apiGatewayManaged", targetDepth))
                {
                    var unmarshaller = BoolUnmarshaller.Instance;
                    response.ApiGatewayManaged = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("autoDeploy", targetDepth))
                {
                    var unmarshaller = BoolUnmarshaller.Instance;
                    response.AutoDeploy = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("clientCertificateId", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.ClientCertificateId = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("createdDate", targetDepth))
                {
                    var unmarshaller = DateTimeUnmarshaller.Instance;
                    response.CreatedDate = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("defaultRouteSettings", targetDepth))
                {
                    var unmarshaller = RouteSettingsUnmarshaller.Instance;
                    response.DefaultRouteSettings = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("deploymentId", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.DeploymentId = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("description", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.Description = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("lastDeploymentStatusMessage", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.LastDeploymentStatusMessage = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("lastUpdatedDate", targetDepth))
                {
                    var unmarshaller = DateTimeUnmarshaller.Instance;
                    response.LastUpdatedDate = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("routeSettings", targetDepth))
                {
                    var unmarshaller = new DictionaryUnmarshaller <string, RouteSettings, StringUnmarshaller, RouteSettingsUnmarshaller>(StringUnmarshaller.Instance, RouteSettingsUnmarshaller.Instance);
                    response.RouteSettings = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("stageName", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.StageName = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("stageVariables", targetDepth))
                {
                    var unmarshaller = new DictionaryUnmarshaller <string, string, StringUnmarshaller, StringUnmarshaller>(StringUnmarshaller.Instance, StringUnmarshaller.Instance);
                    response.StageVariables = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("tags", targetDepth))
                {
                    var unmarshaller = new DictionaryUnmarshaller <string, string, StringUnmarshaller, StringUnmarshaller>(StringUnmarshaller.Instance, StringUnmarshaller.Instance);
                    response.Tags = unmarshaller.Unmarshall(context);
                    continue;
                }
            }

            return(response);
        }
Exemple #4
0
        /// <summary>
        /// Unmarshaller the response from the service to the response class.
        /// </summary>
        /// <param name="context"></param>
        /// <returns></returns>
        public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
        {
            UpdateStageResponse response = new UpdateStageResponse();

            context.Read();
            int targetDepth = context.CurrentDepth;

            while (context.ReadAtDepth(targetDepth))
            {
                if (context.TestExpression("accessLogSettings", targetDepth))
                {
                    var unmarshaller = AccessLogSettingsUnmarshaller.Instance;
                    response.AccessLogSettings = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("cacheClusterEnabled", targetDepth))
                {
                    var unmarshaller = BoolUnmarshaller.Instance;
                    response.CacheClusterEnabled = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("cacheClusterSize", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.CacheClusterSize = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("cacheClusterStatus", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.CacheClusterStatus = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("canarySettings", targetDepth))
                {
                    var unmarshaller = CanarySettingsUnmarshaller.Instance;
                    response.CanarySettings = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("clientCertificateId", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.ClientCertificateId = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("createdDate", targetDepth))
                {
                    var unmarshaller = DateTimeUnmarshaller.Instance;
                    response.CreatedDate = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("deploymentId", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.DeploymentId = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("description", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.Description = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("documentationVersion", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.DocumentationVersion = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("lastUpdatedDate", targetDepth))
                {
                    var unmarshaller = DateTimeUnmarshaller.Instance;
                    response.LastUpdatedDate = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("methodSettings", targetDepth))
                {
                    var unmarshaller = new DictionaryUnmarshaller <string, MethodSetting, StringUnmarshaller, MethodSettingUnmarshaller>(StringUnmarshaller.Instance, MethodSettingUnmarshaller.Instance);
                    response.MethodSettings = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("stageName", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.StageName = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("variables", targetDepth))
                {
                    var unmarshaller = new DictionaryUnmarshaller <string, string, StringUnmarshaller, StringUnmarshaller>(StringUnmarshaller.Instance, StringUnmarshaller.Instance);
                    response.Variables = unmarshaller.Unmarshall(context);
                    continue;
                }
            }

            return(response);
        }