Exemplo n.º 1
0
        private void SetPivotGridFields(PivotGridControl pivotGrid)
        {
            pivotGrid.Fields.Clear();

            var r1 = pivotGrid.AddFieldRowArea <ResultItem>((c) => c.LineID);

            r1.Caption = "LINE_ID";

            var r2 = pivotGrid.AddFieldRowArea <ResultItem>((c) => c.DesignID);

            r2.Caption = "DESIGN_ID";

            var r3 = pivotGrid.AddFieldRowArea <ResultItem>((c) => c.ProductID);

            r3.Caption = "PRODUCT_ID";

            var r4 = pivotGrid.AddFieldRowArea <ResultItem>((c) => c.ProcessID);

            r4.Caption = "PROCESS_ID";

            var r5 = pivotGrid.AddFieldRowArea <ResultItem>((c) => c.StepID);

            r5.Caption = "STEP_ID";

            var r6 = pivotGrid.AddFieldRowArea <ResultItem>((c) => c.Sequence);

            r6.Caption = "SEQUENCE";

            var c1 = pivotGrid.AddFieldColumnArea <ResultItem>((c) => c.Date);

            c1.Caption = "DATE";

            var d1 = pivotGrid.AddFieldDataArea <ResultItem>((c) => c.PlanQty);

            d1.Caption = "MOVE";

            var d2 = pivotGrid.AddFieldDataArea <ResultItem>((c) => c.TargetQty);

            d2.Caption = "TARGET";

            var f1 = pivotGrid.AddFieldFilterArea <ResultItem>((c) => c.MaterialGroup);

            f1.Caption = "MATERIAL_GROUP";

            var f2 = pivotGrid.AddFieldFilterArea <ResultItem>((c) => c.PkgFamily);

            f2.Caption = "PKG_FAMILY";

            var f3 = pivotGrid.AddFieldFilterArea <ResultItem>((c) => c.PkgType);

            f3.Caption = "PKG_TYPE";

            pivotGrid.BestFit();
        }