Beispiel #1
0
        public override void SetData()
        {
            data = new object[rows, DateWorkHelper.GetMaxDaysInMonths(dates) + 1];
            int currentRow = 0;

            for (int i = 0; i < 12; i++)
            {
                if (dates[i] != null)
                {
                    columns = dates[i].Count + 1;
                    SetMonthData(ref currentRow, i);
                }
            }
        }
Beispiel #2
0
        public override void SetDataSize()
        {
            dates = DateWorkHelper.GetDatesByMonths();
            bool isFirstFilled = false;

            for (int i = 0; i < dates.Length; i++)
            {
                if (dates[i] != null)
                {
                    rows += App.MainPageVM.EquipmentsInfo.Count + 2;
                    if (!isFirstFilled)
                    {
                        columns       = dates[i].Count + 1;
                        isFirstFilled = true;
                    }
                }
            }
        }
Beispiel #3
0
 public override void SetSheet()
 {
     Sheet.Name = SHEET_NAME;
     if (rows != 0 && columns != 0)
     {
         try
         {
             Range start = (Range)Sheet.Cells[1, 1];
             Range end   = (Range)Sheet.Cells[rows, DateWorkHelper.GetMaxDaysInMonths(dates) + 1];
             Sheet.Range[start, end].Value2 = GetData();
             SetAlignment(rows + 1);
             Sheet.Columns.AutoFit();
             start = (Range)Sheet.Cells[1, 2];
             end   = (Range)Sheet.Cells[rows, DateWorkHelper.GetMaxDaysInMonths(dates) + 1];
             Sheet.Range[start, end].UseStandardWidth = CELL_WIDTH;
         }
         catch (Exception) { }
     }
 }