Esempio n. 1
0
        void GanttView_BindRowAdded(object sender, GanttRowEventArgs args)
        {
            var info      = args.Item as LotGantt.GanttInfo;
            var colHeader = _gantt.ColumnHeader;

            _calCount++;
            XtraSheetHelper.SetCellFloatValue(colHeader.GetCellInfo(args.RowIndex, ColName.LoadRate), 0);
            //SfGridHelper.SetCellFloatValue(colHeader.GetCellInfo(args.RowIndex, ColName.LoadRate), 0);

            //SfGridHelper.SetTotCellValue(colHeader.GetCellInfo(args.RowIndex, ColName.TIQtySum), _rowsumti);

            XtraSheetHelper.SetTotCellValue(colHeader.GetCellInfo(args.RowIndex, ColName.RunQty), _rowsumto);
            //SfGridHelper.SetTotCellValue(colHeader.GetCellInfo(args.RowIndex, ColName.TOQtySum), _rowsumto);

            double rowLoadRate  = _queryPeriod > 0 ? _rowRunHours / _queryPeriod * 100.0 : 0;
            string sRowLoadRate = rowLoadRate <= 0 ? string.Empty : Math.Round(rowLoadRate, 1).ToString() + "%";

            XtraSheetHelper.SetTotCellValue(colHeader.GetCellInfo(args.RowIndex, ColName.LoadRate), sRowLoadRate);
            //SfGridHelper.SetTotCellValue(colHeader.GetCellInfo(args.RowIndex, ColName.LoadRate), sRowLoadRate);

            _totalRowCnt++;

            colHeader.GetCellInfo(args.RowIndex, ColName.LoadRate).Alignment.Horizontal = SpreadsheetHorizontalAlignment.Left;
            colHeader.GetCellInfo(args.RowIndex, ColName.LoadRate).Alignment.Vertical   = SpreadsheetVerticalAlignment.Center;
            colHeader.GetCellInfo(args.RowIndex, ColName.RunQty).Alignment.Horizontal   = SpreadsheetHorizontalAlignment.Left;
            colHeader.GetCellInfo(args.RowIndex, ColName.RunQty).Alignment.Vertical     = SpreadsheetVerticalAlignment.Center;

            _subTotalTI  += _rowsumti;
            _subTotalTO  += _rowsumto;
            _totLoadRate += rowLoadRate;
            _totalTO     += _rowsumto;
        }
Esempio n. 2
0
        void GanttView_BindRowAdding(object sender, GanttRowEventArgs args)
        {
            var info      = args.Item as LotGantt.GanttInfo;
            var colHeader = _gantt.ColumnHeader;

            SetRowHeaderValue(args.RowIndex, info.LotID);

            this._rowsumti    = 0; //2010.09.13 by ldw
            this._rowsumto    = 0; //2010.09.13 by ldw
            this._rowRunHours = 0;

            if (args.Node == null)
            {
                return;
            }

            var rows = args.Node.LinkedBarList;

            if (rows.Count > 1 && args.Index > 0 && args.Index < rows.Count - 1)
            {
                XtraSheetHelper.SetCellText(colHeader.GetCellInfo(args.RowIndex, ColName.LotID), info.LotID);
                //SfGridHelper.SetCellText(colHeader.GetCellInfo(args.RowIndex, ColName.LotID), info.LotID);

                PaintRowKeyedCell(args.RowIndex, _currColor);
            }
        }
Esempio n. 3
0
        void GanttView_BindRowAdded(object sender, GanttRowEventArgs args)
        {
            var info      = args.Item as ToolGantt.GanttInfo;
            var colHeader = _gantt.ColumnHeader;

            if (_totalLoadTImeFrBarDic.ContainsKey(info.EqpID) == false)
            {
                _totalLoadTImeFrBarDic.Add(info.EqpID, _rowsumLoadTimeFrBar);
            }

            if (this.IsOnlyToolMode)
            {
                string sLoadRate = string.Empty;
                double loadRate  = 0;
                sLoadRate = Math.Round(loadRate, 1).ToString() + "%";
                //XtraSheetHelper.SetTotCellValue(colHeader.GetCellInfo(args.RowIndex, ColName.MaskChangeCnt), _rowsumJobChg);
            }

            XtraSheetHelper.SetTotCellValue(colHeader.GetCellInfo(args.RowIndex, ColName.RunQtySum), _rowsumto);

            _subTotalTI  += _rowsumti;
            _subTotalTO  += _rowsumto;
            _totalTO     += _rowsumto;
            _subJobChg   += _rowsumJobChg;
            _totalJobChg += _rowsumJobChg;
        }
Esempio n. 4
0
        void GanttView_BindRowAdding(object sender, GanttRowEventArgs args)
        {
            var worksheet = this.gantt.Worksheet;

            var info      = args.Item as GanttInfo;
            var colHeader = this.gantt.ColumnHeader;

            this.SetRowHeaderValue(args.RowIndex, info.LineID, info.StepGroup, info.EqpID);
        }
Esempio n. 5
0
        void GanttView_BindRowAdded(object sender, GanttRowEventArgs args)
        {
            this.subTotalTIQty = rowTIQty;
            this.totalTIQty   += rowTIQty;

            var colHeader = this.gantt.ColumnHeader;

            XtraSheetHelper.SetTotCellValue(colHeader.GetCellInfo(typeStartRowIndex, Constants.COLUMN_QTY), this.subTotalTIQty);
            XtraSheetHelper.SetTotCellValue(colHeader.GetCellInfo(lineIDStartRowIndex, Constants.COLUMN_TOTAL), this.totalTIQty);
        }
Esempio n. 6
0
        void GanttView_BindRowAdding(object sender, GanttRowEventArgs args)
        {
            var worksheet = this._gantt.Worksheet;

            var info      = args.Item as ToolGantt.GanttInfo;
            var colHeader = _gantt.ColumnHeader;

            string shopID = info.ShopID;
            string eqpID  = info.EqpID;
            string toolID = info.ToolID;

            SetRowHeaderValue(args.RowIndex, shopID, eqpID, string.IsNullOrEmpty(args.Key) ? "-" : args.Key, toolID);

            this._rowsumti            = 0;
            this._rowsumto            = 0;
            this._rowsumJobChg        = 0;
            this._rowsumLoadTimeFrBar = 0;

            if (args.Node == null)
            {
                return;
            }

            var rows = args.Node.LinkedBarList;

            if (rows.Count > 1 && args.Index > 0 && args.Index < rows.Count - 1)
            {
                XtraSheetHelper.SetCellText(colHeader.GetCellInfo(args.RowIndex, ColName.ShopID), shopID);
                XtraSheetHelper.SetCellText(colHeader.GetCellInfo(args.RowIndex, ColName.MaskID), toolID);
                if (this.IsOnlyToolMode == false)
                {
                    XtraSheetHelper.SetCellText(colHeader.GetCellInfo(args.RowIndex, ColName.EqpId), eqpID);
                }

                PaintRowKeyedCell(args.RowIndex, _currColor);
            }
        }