Пример #1
0
 public void Add(Employee employee)
 {
     employeeList.Add(employee);
 }
Пример #2
0
 public void Delete(Employee employee)
 {
     employeeList.Remove(employee);
 }
Пример #3
0
 /// <summary>
 /// Create a new Employee object.
 /// </summary>
 /// <param name="fname">Initial value of the Fname property.</param>
 /// <param name="lname">Initial value of the Lname property.</param>
 /// <param name="ssn">Initial value of the Ssn property.</param>
 /// <param name="dno">Initial value of the Dno property.</param>
 public static Employee CreateEmployee(global::System.String fname, global::System.String lname, global::System.String ssn, global::System.Int32 dno)
 {
     Employee employee = new Employee();
     employee.Fname = fname;
     employee.Lname = lname;
     employee.Ssn = ssn;
     employee.Dno = dno;
     return employee;
 }
Пример #4
0
 /// <summary>
 /// Deprecated Method for adding a new object to the Employees EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToEmployees(Employee employee)
 {
     base.AddObject("Employees", employee);
 }
Пример #5
0
 public void Delete(Employee employee)
 {
     employeeEntities.DeleteObject(employee);
 }
Пример #6
0
 public void Add(Employee employee)
 {
     employeeEntities.AddObject("Employees", employee);
 }
Пример #7
0
 public ActionResult DeleteEmployee(string essn)
 {
     var employee = new Employee {Ssn = essn};
     _repository.Delete(employee);
     return RedirectToAction("Index");
 }