private void RaportAngajat_Load(object sender, EventArgs e) { // se incarca compania _companie.Load(); _oreLucrate.Load(); // se incarca numele angajatilor in combobox angajatComboBox.BeginUpdate(); foreach (Angajat angajat in _companie.Angajati) { angajatComboBox.Items.Add(angajat.Nume + " " + angajat.Prenume); } angajatComboBox.EndUpdate(); }
private void Pontaj_Load(object sender, EventArgs e) { // se incarca compania _companie.Load(); _oreLucrate.Load(); // se incarca numele angajatilor in combobox angajatiComboBox.BeginUpdate(); foreach (Angajat angajat in _companie.Angajati) { angajatiComboBox.Items.Add(angajat.Nume + " " + angajat.Prenume); } angajatiComboBox.EndUpdate(); dataMonthCalendar.ShowWeekNumbers = true; dataGridView1.DataSource = _oreLucrate.Ore; }
private void Refresh(object sender, EventArgs e) { resurseListView.Items.Clear(); _resurse.OreNoapte = 0; _resurse.OreZi = 0; _oreLucrate.Load(); _companie.Load(); foreach (Ore ore in _oreLucrate.Ore) { if (ore.DeNoapte == true) { _resurse.OreNoapte += ore.OreLucrate; } else { _resurse.OreZi += ore.OreLucrate; } } _resurse.NrAngajati = _companie.Angajati.Count; _resurse.Calcul(); //se actualizeaza listView cu Resursele ListViewItem item = new ListViewItem(_resurse.NrAngajati.ToString()); item.SubItems.Add(_resurse.OreNoapte.ToString()); item.SubItems.Add(_resurse.CostOreNoapte.ToString()); item.SubItems.Add(_resurse.OreZi.ToString()); item.SubItems.Add(_resurse.CostOreZi.ToString()); item.SubItems.Add(_resurse.CostTotal.ToString()); resurseListView.Items.Add(item); resurseListView.Sorting = SortOrder.Ascending; }