コード例 #1
0
 public bool Compare(RecordingDayView view)
 {
     for (int i = 0; i < _recordingTimes.Length; i++)
     {
         if ((_recordingTimes[i].State != view._recordingTimes[i].State) ||
             (_recordingTimes[i].AbsenceEntity != view._recordingTimes[i].AbsenceEntity))
         {
             return(false);
         }
     }
     return(true);
 }
コード例 #2
0
 public void CopyTo(RecordingDayView view)
 {
     for (int i = 0; i < MAXRANGES; i++)
     {
         if (_recordingTimes[i].AbsenceEntity != null)
         {
             view._recordingTimes[i].AbsenceEntity = _recordingTimes[i].AbsenceEntity;
         }
         else
         {
             view._recordingTimes[i].State = _recordingTimes[i].State;
         }
     }
 }
コード例 #3
0
ファイル: RecordingDayRow.cs プロジェクト: 5509850/baumax
        public RecordingDayRow(EmployeeWeek week, RecordingDayView dayview,
            EmployeeWeek actualweek, RecordingDayView actualdayview, long orderHwgr)
        {
            _plannedWeek = week;
            _plannedDayView = dayview;

            _actualWeek = actualweek;
            _actualDayView = actualdayview;

            if (_plannedDayView != null)
                _plannedDay = _plannedDayView.RecordingDay;

            if (_actualDayView != null)
                _actualDay = _actualDayView.RecordingDay;

            if (_plannedWeek.FullName != null)
                _fullname = _plannedWeek.FullName;

            _OrderHWGR = orderHwgr;
        }
コード例 #4
0
ファイル: RecordingDayView.cs プロジェクト: 5509850/baumax
 public void CopyTo(RecordingDayView view)
 {
     for (int i = 0; i < MAXRANGES; i++)
     {
         if (_recordingTimes[i].AbsenceEntity != null)
             view._recordingTimes[i].AbsenceEntity = _recordingTimes[i].AbsenceEntity;
         else
             view._recordingTimes[i].State = _recordingTimes[i].State;
     }
 }
コード例 #5
0
ファイル: RecordingDayView.cs プロジェクト: 5509850/baumax
 public bool Compare(RecordingDayView view)
 {
     for (int i = 0; i < _recordingTimes.Length; i++)
     {
         if ((_recordingTimes[i].State != view._recordingTimes[i].State) ||
             (_recordingTimes[i].AbsenceEntity != view._recordingTimes[i].AbsenceEntity)) return false;
     }
     return true;
 }
コード例 #6
0
ファイル: Painters.cs プロジェクト: 5509850/baumax
        public static void DrawDailyViewCell2(RowCellCustomDrawEventArgs e, int index, DailyViewStyle view, StoreDay storeday, RecordingDayView dayView)
        {
            Rectangle cellBound = Rectangle.Inflate(e.Bounds, 1, 1);

            e.Cache.FillRectangle(Color.White, cellBound);

            Rectangle rect;
            int squareWidth = cellBound.Width;
            Color squareColor = Color.White;
            //int index = infoColumn.FromTime / 15;
            int squareCount = 1;

            if (view == DailyViewStyle.View30)
            {
                cellBound = Rectangle.Inflate(cellBound, -2, 0);
                squareWidth = ((cellBound.Width - 1) / 2);
                squareCount = 2;
            }
            else if (view == DailyViewStyle.View60)
            {
                cellBound = Rectangle.Inflate(cellBound, -2, 0);

                squareWidth = ((cellBound.Width - 3) / 4);
                squareCount = 4;
            }

            int positionX = cellBound.X;
            int currentTime = index * 15;
            Color backColor = Color.White;

            for (int i = 0; i < squareCount; i++)
            {
                currentTime = (index + i) * 15;

                if (!storeday.IsOpeningTime((short)currentTime))
                {
                    backColor = Color.LightGray;
                }
                else backColor = Color.White;

                squareColor = dayView.GetColorByTime((short)currentTime);// (index + i);

                rect = new Rectangle(positionX, cellBound.Y, squareWidth, cellBound.Height);

                if (squareColor == Color.White)
                    squareColor = backColor;

                e.Cache.FillRectangle(squareColor, rect);

                positionX += squareWidth + 1;

            }

            e.Handled = true;
        }
コード例 #7
0
        private void BeforePrintRecordingTable(object sender, PrintEventArgs e)
        {
            _plannedDayView = _actualDayView = null;

            if (DataSource != null && ((IList)DataSource).Count > 0)
            {
                EmployeeWeek ew = GetCurrentEmployee();

                _plannedDayView = new RecordingDayView();
                _plannedDayView.RecordingDay = ew.GetDay(_recordingContext.ViewDate);

                _actualDayView = new RecordingDayView();
                EmployeeWeek emplWeek = _recordingContext.WorldActualState[ew.EmployeeId];
                if (emplWeek != null)
                    _actualDayView.RecordingDay = emplWeek.GetDay(_recordingContext.ViewDate);
            }
        }