Пример #1
0
        public SetAppStatusSession RunSample(ApplicationParameterToChoose sample)
        {
            var session = new SetAppStatusSession {
                Request = sample
            };

            try
            {
                var watch = Stopwatch.StartNew();
                session.Response = _terrasoftProxy.SetApplicationParameters(sample, ConfigurationManager.AppSettings["TerrasoftSvcPass"]);
                watch.Stop();

                session.TimeToPerform = watch.Elapsed;
            }
            catch (Exception ex)
            {
                if (session.Response == null)
                {
                    session.Response = new ParameterResponce
                    {
                        result = new Response()
                    }
                }
                ;

                session.Response.result.IsSuccess    = false;
                session.Response.result.ErrorMessage = ex.ToString();
            }

            SendToStorageService(session);

            return(session);
        }
Пример #2
0
        public static void GET_SET_APP_PARAMS()
        {
            var sample = new ApplicationParameterToChoose
            {
                ApplicationNumber    = "",
                ParameterGroupNumber = ""
            };

            new SetApplicationParametersProcessor().RunSample(sample);
        }