Exemple #1
0
 private void Form2_Load(object sender, EventArgs e)
 {
     foreach (var item in EmplList.ShowEmployee())
     {
         lstResult2.Items.Add(item);
     }
 }
Exemple #2
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            Employee emp = new Employee(txtFirst.Text,
                                        txtLast.Text,
                                        Convert.ToDecimal(txtSalary.Text));

            lstResult.Items.Add(emp);
            txtResult.AppendText(emp.ToString());
            EmplList.AddEmployee(emp);

/*            txtFirst.Clear();
 *          txtLast.Clear();
 *          txtSalary.Clear();*/
        }