Exemplo n.º 1
0
        private void SemanticZoom_ViewChangeStarted(object sender, SemanticZoomViewChangedEventArgs e)
        {
            if (e.SourceItem == null)
            {
                return;
            }

            if (e.SourceItem.Item.GetType() != typeof(HeaderItem))
            {
                return;
            }

            var hi = (HeaderItem)e.SourceItem.Item;

            var group = OperationGroups.SingleOrDefault(d => ((GroupHeaderByDay)d.Key).DayNum == hi.Day);

            if (group != null)
            {
                e.DestinationItem = new SemanticZoomLocation {
                    Item = group
                }
            }
            ;

            //e.DestinationItem = new SemanticZoomLocation { Item = e.SourceItem.Item };
        }
Exemplo n.º 2
0
        public int GetTotalScans(OperationGroups operation)
        {
            if (!Scans.ContainsKey(operation))
            {
                return(0);
            }

            return(Scans[operation].Values.Sum());
        }
Exemplo n.º 3
0
        /// <summary>
        /// Reads the object-operations xmlNode from the Xml file
        /// </summary>
        /// <param name="rootNode">The root xmlNode of the Xml file</param>
        private static void ReadOperationsGroupNode(XmlNode rootNode)
        {
            OperationGroups.Clear();

            foreach (XmlNode objectOperationGroup in rootNode.SelectNodes("object-operations"))
            {
                OperationGroups.Add(new ObjectOperationGroup(objectOperationGroup));
            }
        }
Exemplo n.º 4
0
        public int GetTotalQuantity(OperationGroups operation)
        {
            if (!Quantities.ContainsKey(operation))
            {
                return(0);
            }

            return(Quantities[operation].Values.Sum());
        }
Exemplo n.º 5
0
        public double GetSpeedScansPerHour(OperationGroups operation)
        {
            if (!Scans.ContainsKey(operation))
            {
                return(0.0);
            }

            return(Scans[operation].Values.Sum() / OperationTimes[operation].TotalHours);
        }
Exemplo n.º 6
0
        public int GetTotalLines(OperationGroups operation)
        {
            if (!Lines.ContainsKey(operation))
            {
                return(0);
            }

            return(Lines[operation].Values.Sum());
        }
Exemplo n.º 7
0
        public double GetSpeedQuantityPerHour(OperationGroups operation)
        {
            if (!Quantities.ContainsKey(operation))
            {
                return(0.0);
            }

            return(Quantities[operation].Values.Sum() / OperationTimes[operation].TotalHours);
        }
Exemplo n.º 8
0
        public double GetTotalVolume(OperationGroups operation)
        {
            if (!Volume.ContainsKey(operation))
            {
                return(0.0);
            }

            return(Volume[operation].Values.Sum());
        }
Exemplo n.º 9
0
        public double GetSpeedVolumePerHour(OperationGroups operation)
        {
            if (!Volume.ContainsKey(operation))
            {
                return(0.0);
            }

            return(Volume[operation].Values.Sum() / OperationTimes[operation].TotalHours);
        }
Exemplo n.º 10
0
        public double GetTotalWeight(OperationGroups operation)
        {
            if (!Weight.ContainsKey(operation))
            {
                return(0.0);
            }

            return(Weight[operation].Values.Sum());
        }
Exemplo n.º 11
0
        public double GetSpeedWeightPerHour(OperationGroups operation)
        {
            if (!Weight.ContainsKey(operation))
            {
                return(0.0);
            }

            return(Weight[operation].Values.Sum() / OperationTimes[operation].TotalHours);
        }
        private void InsertForm()
        {
            OperationGroups p = new OperationGroups()
            {
                OperationGroupTitle = txtOpGroup.Text,
                OperationGroupName  = txtOperationGroupName.Text
            };

            db.OperationGroups.AddObject(p);
            db.SaveChanges();
        }
Exemplo n.º 13
0
        private void LoadLabels(int userRiskId)
        {
            UserRisks       userRisk       = db.UserRisks.Where(current => current.UserRiskID == userRiskId).FirstOrDefault();
            Risks           risk           = db.Risks.Where(current => current.RiskID == userRisk.RiskID && current.IsAcceptedByAdmin == true).FirstOrDefault();
            Stages          stage          = db.Stages.Where(current => current.StageID == risk.StageID).FirstOrDefault();
            Acts            act            = db.Acts.Where(current => current.ActID == stage.ActID).FirstOrDefault();
            Operations      operation      = db.Operations.Where(current => current.OperationID == act.OperationID).FirstOrDefault();
            OperationGroups operationGroup = db.OperationGroups.Where(current => current.OperationGroupID == operation.OperationGroupID).FirstOrDefault();

            lblProject.Text      = operationGroup.OperationGroupTitle;
            lblOperation.Text    = operation.OperationTitle;
            lblAct.Text          = act.ActTitle;
            lblStage.Text        = stage.StageTitle;
            ViewState["stageId"] = stage.StageID;
            LoadRiskgrd(stage.StageID);
        }
Exemplo n.º 14
0
        public SwaggerDocumentViewModel(SwaggerDocument model, string url, string displayName = null)
        {
            Model       = model ?? throw new ArgumentNullException(nameof(model));
            Url         = url ?? throw new ArgumentNullException(nameof(url));
            DisplayName = displayName ?? model.Info.Title;

            OperationGroups = model.Operations
                              .OrderBy(op => op.Path)
                              .Select(op => new SwaggerOperationViewModel(op, Model.BaseUrl))
                              .GroupBy(op => op.Model.Operation.Tags.FirstOrDefault() ?? "(Default)")
                              .OrderBy(group => group.Key)
                              .ToList();

            CommonParameters = OperationGroups
                               .SelectMany(group => group)
                               .SelectMany(op => op.Arguments)
                               .GroupBy(arg => arg.ParameterId)
                               .Where(group => group.Count() == model.Operations.Count())
                               .Select(group => SwaggerArgument.FromParameter(group.First().Parameter))
                               .ToList();
        }
 public static IQueryable <Operation> GetOperations(this WorkSpeedDbContext dbContext, OperationGroups group)
 => dbContext.Operations.Where(o => o.Group == group).AsQueryable();
Exemplo n.º 16
0
 public ProductivityTime(OperationGroups operation)
 {
     Operation = operation;
     Duration  = default(TimeSpan);
     EndTime   = default(DateTime);
 }