Beispiel #1
0
 public QtyTypeItem(QtyType value)
 {
     this.Value = value;
 }
Beispiel #2
0
        private void FillData(XtraPivotGridHelper.DataViewTable dataViewTable, CompareItem item, string targetDate, CompareItem total, QtyType qtyType)
        {
            string category = qtyType.ToString();
            float  qty      = 0.0f;

            if (ShowAccumulativeQty)
            {
                qty = item.GetAccQty(targetDate, qtyType);
            }
            else
            {
                qty = item.GetQty(targetDate, qtyType);
            }

            dataViewTable.DataTable.Rows.Add(
                item.SHOP_ID,
                item.STEP_ID,
                item.PRODUCT_ID,
                item.OWNER_TYPE,
                category,
                string.Format("{0:#,##0}", item.GetTotalQty(qtyType)),
                targetDate,
                qty);

            //Total
            var infos = qtyType == QtyType.TARGET ? total.Targets : total.Plans;

            if (qtyType == QtyType.DIFF)
            {
                infos = total.Diffs;
            }

            float prevQty = 0;

            if (infos.TryGetValue(targetDate, out prevQty))
            {
                infos[targetDate] += qty;
            }
            else
            {
                infos.Add(targetDate, 0);
            }
        }