/// <summary> 下一项 </summary> public void GoNext() { this.SelectLink.Stop(); System.Windows.Application.Current.Dispatcher.Invoke(() => { var find = LinkActions.FirstOrDefault(l => l.DisplayName == this.SelectLink.DisplayName); var index = LinkActions.IndexOf(find); if (index < LinkActions.Count - 1) { find.Success = true; this.SelectLink = LinkActions[index + 1]; } else { MessageService.ShowSnackMessage("已是最后一项"); } //this.RunNextEngine = false; this.RunReMeasureEngine = false; }); }
public void Save(CRMDb db) { var index = 1; if (LinkActions != null) { LinkActions.Each(la => { index = 1; if (la.Action != null) { if (la.WorkflowActionID == 0) { var wa = new WorkflowActionsDb() { OrderNumber = index, WorkflowActionTypeID = la.WorkflowActionTypeID, IsSubAction = true, WorkflowID = (short)WorkflowID }; wa.Save(db); } else { la.OrderNumber = index; la.IsSubAction = true; la.WorkflowID = (short)WorkflowID; la.Save(db); } la.Action.Save(db); db.SaveChanges(); if (!la.IsDeleted) { LinkActionID = la.Action.WorkflowActionID; SaveActionLink(db); db.SaveChanges(); } index++; } }); } }