示例#1
0
        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="operation"></param>
        // mbr - 2009-07-21 - made public...
        //internal DatabaseUpdateContext(IOperationItem operation)
        public DatabaseUpdateContext(IOperationItem operation, bool trace)
		{
			if(operation == null)
				operation = new OperationItem();
			_operation = operation;
            this.Trace = trace;
		}
示例#2
0
        // Use this for initialization
        void PopulateList()
        {
            if (mockData == null)
            {
                Debug.LogError("Mock Data not loaded");
                return;
            }
            if (operations.Length <= 0)
            {
                Debug.LogError("Operation list is empty");
                return;
            }

            content.sizeDelta = new Vector2(0, operations.Length * itemHeight);

            for (int i = 0; i < operations.Length; i++)
            {
                float      spawnY      = i * itemHeight;
                Vector3    pos         = new Vector3(SpawnPoint.position.x, -spawnY, SpawnPoint.position.z);
                GameObject SpawnedItem = Instantiate(item, Vector3.zero, SpawnPoint.rotation);
                SpawnedItem.transform.SetParent(SpawnPoint, false);
                SpawnedItem.name = operations[i];
                OperationItem itemDetails = SpawnedItem.GetComponent <OperationItem>();
                itemDetails.Setup(new OperationItemData(operations[i]));
                itemDetails.button.onClick.AddListener(() => OnListItemClick(itemDetails.data.text));
            }
        }
示例#3
0
        private void _destinationFileNameBrowseButton_Click(object sender, EventArgs e)
        {
            OperationItem operationItem = GetCurrentOperation();

            if (operationItem.DestinationMustExist)
            {
                // Destination file must be a valid PDF file
                bool    isPostscript;
                PDFFile destinationDocument = BrowsePDFDocument(true, out isPostscript);
                if (destinationDocument != null)
                {
                    _destinationDocument = destinationDocument;

                    _destinationFileNameTextBox.Text = _destinationDocument.FileName;
                    _destinationFilePropertiesControl.SetFileProperties(_destinationDocument);
                }
            }
            else
            {
                // We will not check here
                string fileName = RunPDFSaveFileDialog();
                if (fileName != null)
                {
                    _destinationFileNameTextBox.Text = fileName;
                }
            }

            UpdateUIState();
        }
示例#4
0
        public async Task SignOutAsync(SignOutCommand command, CancellationToken cancellationToken = default)
        {
            var(force, session) = command;
            var    context = CommandContext.GetCurrent();
            string?userId;

            if (Computed.IsInvalidating())
            {
                GetUserAsync(session, default).Ignore();
                userId = context.Items.TryGet <OperationItem <string?> >()?.Value;
                if (userId != null)
                {
                    GetUserSessionsAsync(userId, default).Ignore();
                }
                if (force)
                {
                    IsSignOutForcedAsync(session, default).Ignore();
                }
                return;
            }

            await using var dbContext = await CreateCommandDbContextAsync(cancellationToken).ConfigureAwait(false);

            var dbSession = await GetOrCreateSessionAsync(dbContext, session, cancellationToken).ConfigureAwait(false);

            userId = dbSession.UserId;
            dbSession.IsSignOutForced = force;
            dbSession.UserId          = null;
            context.Items.Set(OperationItem.New(userId));
            await dbContext.SaveChangesAsync(cancellationToken);
        }
示例#5
0
        private bool TryGetLatestOperation(out Operation operation)
        {
            // TODO: We may read the values from the settings?
            const int  maxAgeInMinutes     = 800 * 60;
            const bool onlyNonAcknowledged = false;
            // For the moment, we are only interested about the latest operation (if any).
            const int limitAmount = 1;

            operation = null;

            try
            {
                using (var service = InternalServiceProxy.GetServiceInstance())
                {
                    IList <int> ids = service.Instance.GetOperationIds(maxAgeInMinutes, onlyNonAcknowledged, limitAmount);
                    if (ids.Count > 0)
                    {
                        // Retrieve the operation with full detail to allow us to access the route image
                        OperationItem operationItem = service.Instance.GetOperationById(ids[0], OperationItemDetailLevel.Full);
                        operation = operationItem.ToOperation();
                    }
                    return(true);
                }
            }
            catch (EndpointNotFoundException)
            {
                // We can ignore this exception. It usually occurs if the service is just starting up.
                // TODO: But we may show this information in a red label on the website, still?
            }
            return(false);
        }
示例#6
0
        private bool ProcessOperationItem(ref OperationItem item)
        {
            bool isCompleted = false;

            switch (item.behaviour)
            {
            case BehaviourType.RanToEnd:
                item.operation.RanToEnd();
                isCompleted = true;
                break;

            case BehaviourType.Cancel:
                item.operation.Cancel();
                isCompleted = true;
                break;

            case BehaviourType.Resume:
                item.operation.paused = false;
                break;

            case BehaviourType.Pause:
                item.operation.paused = true;
                break;
            }
            return(isCompleted);
        }
        private void continuebtn_Click(object sender, EventArgs e)
        {
            if (OpGrid.Rows.Count > 1)
            {
                for (int i = 0; i < OpGrid.Rows.Count; i++)
                {
                    if (OpGrid[0, i].Value != null)
                    {
                        OperationItem Temp = new OperationItem();

                        Temp.Operation = Convert.ToInt32(OpGrid[0, i].Value);

                        Temp.WC = OpGrid[1, i].Value.ToString();

                        Temp.LaborHours = Convert.ToDouble(OpGrid[2, i].Value);

                        Temp.SetupHours = Convert.ToDouble(OpGrid[3, i].Value);

                        OpItems.Add(Temp);
                    }
                }

                this.DialogResult = DialogResult.OK;

                this.Close();
            }
            else
            {
                MessageBox.Show("Process requires at least one operation of \"PICK.\"","Error!",MessageBoxButtons.OK,MessageBoxIcon.Asterisk);
            }
        }
示例#8
0
        private OperationItem LoadOperationItemFromXml(SecurityElement element)
        {
            OperationItem item = new OperationItem {
                ItemId        = StrParser.ParseHexInt(element.Attribute("ItemId"), 0),
                ItemName      = element.Attribute("ItemName"),
                ItemIcon      = StrParser.ParseHexInt(element.Attribute("ItemIcon"), 0),
                ItemDesc      = element.Attribute("ItemDesc"),
                CompareType   = TypeNameContainer <_ConditionValueCompareType> .GetTypeByName(element.Attribute("CompareType")),
                CompareValue  = StrParser.ParseDecInt(element.Attribute("CompareValue"), 0),
                CycleMaxCount = StrParser.ParseDecInt(element.Attribute("CycleMaxCount"), 0)
            };

            if (element.Children != null)
            {
                foreach (SecurityElement element2 in element.Children)
                {
                    string str;
                    if (((str = element2.Tag) != null) && (str == "Reward"))
                    {
                        item.Rewards.Add(LoadRewardFromXml(element2));
                    }
                }
            }
            return(item);
        }
示例#9
0
 public GetSchemaArgs(IOperationItem op)
 {
     if (op == null)
     {
         op = new OperationItem();
     }
     _operationItem = op;
 }
示例#10
0
 public ActionResult Refresh(ItemDB[] db)
 {
     if (CheckCookie("Refresh"))
     {
         OperationItem.Refresh(db, fList, _environment.WebRootPath);
     }
     return(RedirectToAction("Edit"));
 }
示例#11
0
        private void Timer_Elapsed(object sender, ElapsedEventArgs e)
        {
            lock (Lock)
            {
                try
                {
                    using (var service = InternalServiceProxy.GetServiceInstance())
                    {
                        int  maxAge = Configuration.OperationFetchingArguments.MaxAge;
                        bool onlyNonAcknowledged = Configuration.OperationFetchingArguments.OnlyNonAcknowledged;
                        int  limitAmount         = Configuration.OperationFetchingArguments.LimitAmount;

                        var operations = service.Instance.GetOperationIds(maxAge, onlyNonAcknowledged, limitAmount);
                        if (operations.Count == 0)
                        {
                            return;
                        }

                        foreach (int operationId in operations)
                        {
                            // Check if we already have this event (in this case don't retrieve it all over again)
                            if (ContainsEvent(operationId))
                            {
                                continue;
                            }

                            // Second parameter determines the detail level. Here, we can use "1" (full detail).
                            OperationItem operation = service.Instance.GetOperationById(operationId, OperationItemDetailLevel.Full);

                            // If the event is too old, do display it this time, but acknowledge it so it won't show up
                            if (ShouldAutomaticallyAcknowledgeOperation(operation))
                            {
                                service.Instance.AcknowledgeOperation(operation.Id);
                            }
                            else
                            {
                                // Push the event to the queue
                                PushEvent(operation);
                            }
                        }
                    }
                }
                catch (EndpointNotFoundException)
                {
                    // This is ok, since it also occurs when the service is starting up.
                }
                catch (Exception ex)
                {
                    // This could be interesting though...
                    Logger.Instance.LogException(this, ex);
                }
            }
        }
示例#12
0
        private bool ShouldAutomaticallyAcknowledgeOperation(OperationItem operationItem)
        {
            if (!Configuration.AutomaticOperationAcknowledgement.IsEnabled)
            {
                return(false);
            }

            int      daage = Configuration.AutomaticOperationAcknowledgement.MaxAge;
            TimeSpan dat   = daage > 0 ? TimeSpan.FromMinutes(daage) : Operation.DefaultAcknowledgingTimespan;

            return(!operationItem.IsAcknowledged && (DateTime.UtcNow - operationItem.Timestamp) > dat);
        }
示例#13
0
        public ActionResult CreateItem(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }

            OperationItem OperationItem = new OperationItem();

            OperationItem.TicketId = id;
            return(View(OperationItem));
        }
示例#14
0
        ///// <summary>
        ///// Gets the work units that describe the differences between two schemas.
        ///// </summary>
        ///// <param name="existingSchema"></param>
        ///// <returns></returns>
        //public WorkUnitCollection GetSchemaWorkUnits(SqlSchema existingSchema)
        //{
        //	return this.GetSchemaWorkUnits(existingSchema, null);
        //}

        /// <summary>
        /// Gets the work units that describe the differences between two schemas.
        /// </summary>
        /// <param name="existingSchema"></param>
        /// <returns></returns>
        public WorkUnitCollection GetSchemaWorkUnits(SqlSchema existingSchema, IOperationItem operation = null)
        {
            if (existingSchema == null)
            {
                throw new ArgumentNullException("existingSchema");
            }

            // item...
            if (operation == null)
            {
                operation = new OperationItem();
            }

            // results...
            WorkUnitCollection results = new WorkUnitCollection();

            // find missing tables...
            operation.ProgressMaximum = this.Tables.Count;
            operation.ProgressValue   = 0;
            foreach (SqlTable table in this.Tables)
            {
                // walk...
                SqlTable matchingTable = null;
                foreach (SqlTable existingTable in existingSchema.Tables)
                {
                    if (string.Compare(table.NativeName, existingTable.NativeName, true, System.Globalization.CultureInfo.InvariantCulture) == 0)
                    {
                        matchingTable = existingTable;
                        break;
                    }
                }

                // found?
                if (matchingTable == null)
                {
                    results.AddRange(table.GetCreateTableWorkUnit());
                }
                else
                {
                    results.AddRange(table.GetSchemaWorkUnits(matchingTable));
                }

                // next...
                operation.IncrementProgress();
            }

            // mbr - 14-12-2005 - sort the units...
            results.Sort(new SchemaWorkUnitTypeComparer());

            // return...
            return(results);
        }
示例#15
0
 public ActionResult Edit(string name = "")
 {
     if (CheckCookie("edit"))
     {
         // init fields;
         EditItemDB edb = new EditItemDB();
         edb.name    = name;
         edb.filters = OperationItem.getNames(fList);
         edb.items   = OperationItem.get(fList, name);
         return(View(edb));
     }
     return(RedirectToAction("Index"));
 }
示例#16
0
        public ActionResult EditItem(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            OperationItem OperationItem = bll.OperationItems.Find(id);

            if (OperationItem == null)
            {
                return(HttpNotFound());
            }

            return(View(OperationItem));
        }
示例#17
0
        /// <summary>
        /// Creates an item to use with the dialog.
        /// </summary>
        /// <returns></returns>
        private void SetupItem(string status)
        {
            if (status == null)
            {
                throw new ArgumentNullException("status");
            }
            if (status.Length == 0)
            {
                throw new ArgumentOutOfRangeException("'status' is zero-length.");
            }

            OperationItem item = new OperationItem();

            item.Status = status;
            this.AddBar(item);
        }
示例#18
0
        private void OptionsUpdateUIState()
        {
            _previousButton.Enabled = true;
            _nextButton.Enabled     = true;
            _nextButton.Text        = "&Finish";

            OperationItem operationItem = GetCurrentOperation();

            if (operationItem.DestinationMustExist)
            {
                _optionsConvertOptionsControl.SetDocument(_destinationDocument, true, operationItem.ShowSecurityOptions, operationItem.ShowOptimizationOptions, operationItem.ShowInitialViewOptions, _firstPageNumber, _lastPageNumber);
            }
            else
            {
                _optionsConvertOptionsControl.SetDocument(_sourceDocument, operationItem.ShowCompatibilityLevel, operationItem.ShowSecurityOptions, operationItem.ShowOptimizationOptions, operationItem.ShowInitialViewOptions, _firstPageNumber, _lastPageNumber);
            }
        }
示例#19
0
 private void GetOperation(string id, out Operation operation)
 {
     operation = null;
     try
     {
         using (WrappedService <IAlarmWorkflowServiceInternal> service = InternalServiceProxy.GetServiceInstance())
         {
             OperationItem operationItem = service.Instance.GetOperationById(int.Parse(id));
             operation = operationItem.ToOperation();
         }
     }
     catch (EndpointNotFoundException)
     {
         Page page = this;
         ServiceConnection.Instance.RedirectToErrorPage(ref page);
     }
 }
示例#20
0
        private void DestinationFileUpdateUIState()
        {
            _previousButton.Enabled = true;
            _nextButton.Enabled     = true;

            OperationItem operationItem = GetCurrentOperation();

            if (operationItem.DestinationMustExist)
            {
                // Use must select a destination file
                _destinationFileUseSourceFileCheckBox.Checked    = false;
                _destinationFileUseSourceFileCheckBox.Visible    = false;
                _destinationFileNameGroupBox.Enabled             = true;
                _destinationFilePropertiesControl.Visible        = true;
                _destinationFileInsertPageNumberGroupBox.Visible = true;
                if (string.IsNullOrEmpty(_destinationFileInsertPageNumberTextBox.Text))
                {
                    _destinationFileInsertPageNumberTextBox.Text = "-1";
                }
            }
            else
            {
                _destinationFileUseSourceFileCheckBox.Visible    = true;
                _destinationFileNameGroupBox.Enabled             = !_destinationFileUseSourceFileCheckBox.Checked;
                _destinationFilePropertiesControl.Visible        = false;
                _destinationFileInsertPageNumberGroupBox.Visible = false;
            }

            if (operationItem.ShowDigitalSignatureOptions)
            {
                if (_destinationFileUseSourceFileCheckBox.Checked)
                {
                    _destinationFileNameTextBox.Text = _sourceDocument.FileName;
                }

                _signatureFileNameGroupBox.Visible = true;
                _filePasswordGroupBox.Visible      = true;
                _nextButton.Text = "&Finish";
            }
            else
            {
                _signatureFileNameGroupBox.Visible = false;
                _filePasswordGroupBox.Visible      = false;
                _nextButton.Text = "&Next";
            }
        }
示例#21
0
        private void OperationUpdateUIState()
        {
            _previousButton.Enabled = true;
            _nextButton.Enabled     = true;
            _nextButton.Text        = "&Next";

            OperationItem operationItem = GetCurrentOperation();

            _operationSourcePages.Visible      = operationItem.ShowPages;
            _operationAllPagesCheckBox.Visible = operationItem.CanUseAllPages;
            if (!_operationAllPagesCheckBox.Visible)
            {
                _operationAllPagesCheckBox.Checked = false;
            }

            _operationFirstPageNumberTextBox.Enabled = !_operationAllPagesCheckBox.Checked;
            _operationLastPageNumberTextBox.Enabled  = !_operationAllPagesCheckBox.Checked;
        }
        public ActionResult CreateItem2(OperationItem OperationItem)
        {
            int?Id = OperationItem.TicketId;

            if (OperationItem != null)
            {
                bll.OperationItems.Add(OperationItem);
            }

            OperationTicket OperationTicket = bll.OperationTickets.Find(Id);

            if (OperationTicket == null)
            {
                return(HttpNotFound());
            }

            return(RedirectToAction("Edit", OperationTicket));
        }
示例#23
0
        public ActionResult EditItem(OperationItem OperationItem)
        {
            int?Id = OperationItem.TicketId;

            if (ModelState.IsValid)
            {
                bll.OperationItems.Edit(OperationItem);
            }

            OperationTicket OperationTicket = bll.OperationTickets.Find(Id);

            if (OperationTicket == null)
            {
                return(HttpNotFound());
            }

            return(RedirectToAction("Edit", OperationTicket));
        }
示例#24
0
        private void PushEvent(OperationItem operation)
        {
            lock (Lock)
            {
                Dispatcher.Invoke((Action)(() =>
                {
                    if (_eventWindow == null)
                    {
                        _eventWindow = new EventWindow();
                        _eventWindow.Closed += EventWindow_Closed;
                        _eventWindow.Show();
                    }

                    // Call the event window on this operation
                    _eventWindow.PushEvent(operation.ToOperation());
                }));
            }
        }
示例#25
0
        /// <summary>
        /// Creates a context.
        /// </summary>
        /// <param name="log"></param>
        public OperationContext(ILog log, IOperationItem innerOperation)
        {
            if (log == null)
            {
                log = new NullLog();
            }
            _innerLog = log;

            // check...
            if (innerOperation == null)
            {
                innerOperation             = new OperationItem();
                _defaultInnerOperationUsed = true;
            }
            _innerOperation = innerOperation;

            // setup...
            _logItems.ItemAdded += new OperationLogItemEventHandler(_logItems_ItemAdded);
        }
示例#26
0
    /// <summary>
    /// 显示工作票路线
    /// </summary>
    public void ShowOperationTicketPath(OperationTicket operationTicketT)
    {
        Hide();
        if (operationTicketT.OperationItems == null)
        {
            return;
        }
        for (int i = 0; i < operationTicketT.OperationItems.Length; i++)
        {
            OperationItem item = operationTicketT.OperationItems[i];
            //DevNode devNodeT = RoomFactory.Instance.GetDevById(item.DevId);
            //if (devNodeT == null) continue;
            //GameObject targetTagObj1 = UGUIFollowTarget.CreateTitleTag(devNodeT.gameObject, Vector3.zero);
            //GameObject uiObj1 = UGUIFollowManage.Instance.CreateItem(followUI.gameObject, targetTagObj1, "TwoTicketFollowUI", null, false, false);
            //MobileInspectionFollowUI follow1 = uiObj1.GetComponent<MobileInspectionFollowUI>();
            //follow1.Init(true, i.ToString(), devNodeT.name);

            RoomFactory.Instance.GetDevById(item.DevId,
                                            (devNodeT) =>
            {
                if (devNodeT == null)
                {
                    return;
                }
                GameObject targetTagObj1 = UGUIFollowTarget.CreateTitleTag(devNodeT.gameObject, Vector3.zero);
                GameObject uiObj1        = UGUIFollowManage.Instance.CreateItem(followUI.gameObject, targetTagObj1, "TwoTicketFollowUI", null, false, false);
                //MobileInspectionFollowUI follow1 = uiObj1.GetComponent<MobileInspectionFollowUI>();
                TwoTicketFollowUI follow1    = uiObj1.GetComponent <TwoTicketFollowUI>();
                List <OperationItem> listT   = operationTicketT.OperationItems.ToList();
                OperationItem operationItemT = listT.Find((itemt) => itemt.DevId == devNodeT.Info.DevID);
                //index = index + 1;
                //if (index > 0)
                //{
                //    follow1.Init(true, index.ToString(), devNodeT.name);
                //}
                follow1.Init(true, operationItemT.OrderNum.ToString(), devNodeT.name);
            });
        }

        //CreateOperationTicketHistoryPath(operationTicketT);
    }
示例#27
0
        private void _nextButton_Click(object sender, EventArgs e)
        {
            if (_mainWizardControl.SelectedTab == _sourceFileTabPage)
            {
                SourceFileNextPage();
            }
            else if (_mainWizardControl.SelectedTab == _operationTabPage)
            {
                OperationNextPage();
            }
            else if (_mainWizardControl.SelectedTab == _distillTabPage)
            {
                DistillNextPage();
            }
            else if (_mainWizardControl.SelectedTab == _sourceFilesTabPage)
            {
                SourceFilesNextPage();
            }
            else if (_mainWizardControl.SelectedTab == _destinationFileTabPage)
            {
                OperationItem operationItem = GetCurrentOperation();
                if (operationItem.ShowDigitalSignatureOptions)
                {
                    _destinationFileName = _destinationFileNameTextBox.Text;
                    OptionsNextPage();
                    _filePasswordTextBox.Text = "";
                }
                else
                {
                    DestinationFileNextPage();
                }
            }
            else if (_mainWizardControl.SelectedTab == _optionsTabPage)
            {
                OptionsNextPage();
            }

            UpdateUIState();
        }
示例#28
0
        private void DestinationFilePreviousPage()
        {
            OperationItem operationItem = GetCurrentOperation();

            if (operationItem.MutlipleSourceFiles)
            {
                _mainWizardControl.SelectedTab = _sourceFilesTabPage;
            }
            else
            {
                if (!_isSourcePostscript)
                {
                    _mainWizardControl.SelectedTab   = _operationTabPage;
                    _destinationFileNameTextBox.Text = null;
                    _destinationFileUseSourceFileCheckBox.Checked = false;
                }
                else
                {
                    _mainWizardControl.SelectedTab = _distillTabPage;
                }
            }
        }
        internal bool TryGetLatestOperation(out Operation operation, ref Page page)
        {
            int  maxAgeInMinutes     = WebsiteConfiguration.Instance.MaxAge;
            bool onlyNonAcknowledged = WebsiteConfiguration.Instance.NonAcknowledgedOnly;
            // For the moment, we are only interested about the latest operation (if any).
            const int limitAmount = 1;

            operation = null;

            try
            {
                using (WrappedService <IAlarmWorkflowServiceInternal> service = InternalServiceProxy.GetServiceInstance())
                {
                    if (service.IsFaulted)
                    {
                        return(false);
                    }
                    IList <int> ids = service.Instance.GetOperationIds(maxAgeInMinutes, onlyNonAcknowledged, limitAmount);
                    if (ids.Count > 0)
                    {
                        // Retrieve the operation with full detail to allow us to access the route image
                        OperationItem operationItem = service.Instance.GetOperationById(ids[0]);
                        operation = operationItem.ToOperation();
                    }
                    return(true);
                }
            }
            catch (EndpointNotFoundException)
            {
                if (page.GetType().BaseType == typeof(Default) || page.GetType().BaseType == typeof(Idle))
                {
                    RedirectToErrorPage(ref page);
                }
            }
            return(false);
        }
示例#30
0
 public ActionResult New(ItemDB d)
 {
     OperationItem.Write(_environment.WebRootPath, d, d.files != null ? true : false);
     return(RedirectToAction("Index"));
 }
示例#31
0
        //获取操作票列表
        public List <OperationTicket> GetOperationTicketList()
        {
            var operationTickets = db.OperationTickets.ToList();
            //return operationTickets.ToWcfModelList();
            OperationTicket o1 = new OperationTicket()
            {
                Id = 1, No = "100001", Guardian = "李新风G"
            };

            o1.OperationTask      = "操作任务";
            o1.OperationStartTime = DateTime.Now.AddHours(-2);
            o1.OperationEndTime   = DateTime.Now;
            o1.Operator           = "刘华名";
            o1.DutyOfficer        = "车马风";
            o1.Dispatch           = "调度";
            o1.Remark             = "备注";
            o1.OperatorPersonelId = 7;
            OperationItem oi1 = new OperationItem()
            {
                Id = 1, OrderNum = 1, Item = "操作项1", DevId = "103cef6e-3155-4be8-a166-41ac567b7b01"
            };
            OperationItem oi2 = new OperationItem()
            {
                Id = 2, OrderNum = 2, Item = "操作项2", DevId = "e65ac4c1-0936-409f-9f09-894f5ee20fb8"
            };
            //OperationItem oi3 = new OperationItem() { Id = 3, OrderNum = 3, Item = "操作项3", DevId = "7ac0698a-8360-483e-b827-ba6e512ccdb2" };
            //OperationItem oi4 = new OperationItem() { Id = 4, OrderNum = 4, Item = "操作项4", DevId = "4c764e74-c03d-4967-9b6d-46c151a4fa23" };
            OperationItem oi3 = new OperationItem()
            {
                Id = 3, OrderNum = 3, Item = "操作项3", DevId = "56ae2f57-0068-4539-b496-f5198a216ef2"
            };
            OperationItem oi4 = new OperationItem()
            {
                Id = 4, OrderNum = 4, Item = "操作项4", DevId = "f2abcb56-8382-459e-b89f-2e1afd4043f4"
            };

            o1.OperationItems = new List <OperationItem>()
            {
                oi1, oi2, oi3, oi4
            };

            OperationTicket o2 = new OperationTicket()
            {
                Id = 2, No = "100002", Guardian = "赵一含G"
            };
            OperationTicket o3 = new OperationTicket()
            {
                Id = 3, No = "100003", Guardian = "刘国柱G"
            };
            OperationTicket o4 = new OperationTicket()
            {
                Id = 4, No = "100004", Guardian = "陈浩然G"
            };
            OperationTicket o5 = new OperationTicket()
            {
                Id = 5, No = "100005", Guardian = "李一样G"
            };
            List <OperationTicket> os = new List <OperationTicket>()
            {
                o1, o2, o3, o4, o5
            };

            return(os);
        }