Пример #1
0
        /// <summary>
        /// Inserts data to database
        /// </summary>
        /// <returns></returns>
        public AsyncProcessingServiceParameterValue InsertData()
        {
            AsyncProcessingServiceParameterValue asyncParameterValue;

            byte[] arr = { 1, 2, 3, 4, 5 };

            asyncParameterValue = new AsyncProcessingServiceParameterValue("AsyncProcessingService", "Start", "Start", "SQL",
                                                                           new MyUserInfo("AsyncProcessingService", "AsyncProcessingService"));
            asyncParameterValue.UserId                 = "A";
            asyncParameterValue.ProcessName            = "AAA";
            asyncParameterValue.Data                   = CustomEncode.ToBase64String(arr);
            asyncParameterValue.ExecutionStartDateTime = DateTime.Now;
            asyncParameterValue.RegistrationDateTime   = DateTime.Now;
            asyncParameterValue.NumberOfRetries        = 0;
            asyncParameterValue.ProgressRate           = 0;
            asyncParameterValue.CompletionDateTime     = DateTime.Now;
            asyncParameterValue.StatusId               = (int)(AsyncProcessingServiceParameterValue.AsyncStatus.Register);
            asyncParameterValue.CommandId              = 0;
            asyncParameterValue.ReservedArea           = "xxxxxx";

            DbEnum.IsolationLevelEnum         iso = DbEnum.IsolationLevelEnum.DefaultTransaction;
            AsyncProcessingServiceReturnValue asyncReturnValue;

            AsyncSvc_sample.LayerB layerB = new AsyncSvc_sample.LayerB();
            asyncReturnValue = (AsyncProcessingServiceReturnValue)layerB.DoBusinessLogic((AsyncProcessingServiceParameterValue)asyncParameterValue, iso);

            return(asyncParameterValue);
        }
Пример #2
0
        /// <summary>
        /// Inserts data to database
        /// </summary>
        /// <returns></returns>
        public AsyncProcessingServiceParameterValue InsertData()
        {
            AsyncProcessingServiceParameterValue asyncParameterValue;
            byte[] arr = { 1, 2, 3, 4, 5 };

            asyncParameterValue = new AsyncProcessingServiceParameterValue("AsyncProcessingService", "Start", "Start", "SQL",
                                                                            new MyUserInfo("AsyncProcessingService", "AsyncProcessingService"));
            asyncParameterValue.UserId = "A";
            asyncParameterValue.ProcessName = "AAA";
            asyncParameterValue.Data = CustomEncode.ToBase64String(arr);
            asyncParameterValue.ExecutionStartDateTime = DateTime.Now;
            asyncParameterValue.RegistrationDateTime = DateTime.Now;
            asyncParameterValue.NumberOfRetries = 0;
            asyncParameterValue.ProgressRate = 0;
            asyncParameterValue.CompletionDateTime = DateTime.Now;
            asyncParameterValue.StatusId = (int)(AsyncProcessingServiceParameterValue.AsyncStatus.Register);
            asyncParameterValue.CommandId = 0;
            asyncParameterValue.ReservedArea = "xxxxxx";

            DbEnum.IsolationLevelEnum iso = DbEnum.IsolationLevelEnum.DefaultTransaction;
            AsyncProcessingServiceReturnValue asyncReturnValue;

            AsyncSvc_sample.LayerB layerB = new AsyncSvc_sample.LayerB();
            asyncReturnValue = (AsyncProcessingServiceReturnValue)layerB.DoBusinessLogic((AsyncProcessingServiceParameterValue)asyncParameterValue, iso);

            return asyncParameterValue;
        }