Пример #1
0
        public FormReprimands(Worker worker)
        {
            InitializeComponent();
            this.selectedWorker = worker;

            foreach (Reprimand r in selectedWorker.Reprimand)
            {
                UserControlReprimand ucr = new UserControlReprimand(r);
                flowLayoutPanelReprimand.Controls.Add(ucr);
            }
        }
Пример #2
0
        internal string getPenaltyPoints()
        {
            int sum = 0;

            foreach (Object obj in flowLayoutPanelReprimand.Controls)
            {
                if (obj is UserControlReprimand)
                {
                    UserControlReprimand ucr = obj as UserControlReprimand;
                    sum += ucr.getPoints();
                }
            }

            return("Nagany: " + sum + " / 200");
        }