public void Hire(Employee selemp, int salary) { if (IsEnough(selemp, salary)) { selemp.RealSalary = salary; Emps.Add(selemp); NotHired.Remove(selemp); } SelectedButNotHired = null; }
void addEmp(object param) { if (param == null) { param = "NAME"; } Emps.Add(new Emp() { Empno = Emps.Count + 1, Ename = param.ToString() }); }