Example #1
0
        private string GetFavoriteRestName(Employments RestType, YearStats statsType)
        {
            string restName;

            if (rest.MainEmployment == "отсутствует")
            {
                restName = "отсутствует";
            }
            else
            {
                string restCode = Management.GetValueByIndex(statsType.MainEmployment, 1);
                employments = RestType;
                employments.SetEmploymentValuesByCode(restCode);
                restName = employments.Name;
            }

            return(restName);
        }
Example #2
0
        private void ColorDataGridView(YearStats yearStats)
        {
            int contrast = 20;
            int colorCode;
            int rowsCount = DGVMoreStats.Rows.Count;

            DGVMoreStats.Rows.Clear();
            DGVMoreStats.Rows.Add(rowsCount);

            for (int yw = 0; yw < 52; yw++)
            {
                for (int dow = 0; dow < 7; dow++)
                {
                    if (yearStats.yearEmpNum[dow, yw] > 0)
                    {
                        colorCode = yearStats.yearEmpNum[dow, yw] * contrast;
                        DGVMoreStats.Rows[dow].Cells[yw].Style.BackColor = yearStats.GetCellColor(colorCode);
                    }
                }
            }
        }
Example #3
0
        private string GetRestTimeSpent(YearStats statsType)
        {
            string restHours = statsType.MainEmploymentHrs.ToString();

            return(restHours);
        }