コード例 #1
0
ファイル: DataAccess.cs プロジェクト: StavoG/EOH
 public void UpdateEmployee(Employee employee)
 {
     Employee emp = entities.Employees.FirstOrDefault(e => e.EmployeeID == employee.EmployeeID);
     emp.EmployedDate = employee.EmployedDate;
     emp.EmployeeNum = employee.EmployeeNum;
     emp.TerminatedDate = employee.TerminatedDate;
     entities.SaveChanges();
 }
コード例 #2
0
ファイル: EOHService.svc.cs プロジェクト: StavoG/EOH
 public void UpdateEmployee(Employee employee)
 {
     new DataAccess().UpdateEmployee(employee);
 }
コード例 #3
0
ファイル: EOHService.svc.cs プロジェクト: StavoG/EOH
 public void AddEmployee(Employee employee)
 {
     new DataAccess().SaveEmployee(employee);
 }
コード例 #4
0
ファイル: DataAccess.cs プロジェクト: StavoG/EOH
 public void SaveEmployee(Employee employee)
 {
     entities.Employees.AddObject(employee);
     entities.SaveChanges();
 }
コード例 #5
0
ファイル: EOH_Model.Designer.cs プロジェクト: StavoG/EOH
 /// <summary>
 /// Create a new Employee object.
 /// </summary>
 /// <param name="employeeID">Initial value of the EmployeeID property.</param>
 /// <param name="personID">Initial value of the PersonID property.</param>
 /// <param name="employeeNum">Initial value of the EmployeeNum property.</param>
 /// <param name="employedDate">Initial value of the EmployedDate property.</param>
 /// <param name="terminatedDate">Initial value of the TerminatedDate property.</param>
 public static Employee CreateEmployee(global::System.Int32 employeeID, global::System.Int32 personID, global::System.String employeeNum, global::System.DateTime employedDate, global::System.DateTime terminatedDate)
 {
     Employee employee = new Employee();
     employee.EmployeeID = employeeID;
     employee.PersonID = personID;
     employee.EmployeeNum = employeeNum;
     employee.EmployedDate = employedDate;
     employee.TerminatedDate = terminatedDate;
     return employee;
 }
コード例 #6
0
ファイル: EOH_Model.Designer.cs プロジェクト: StavoG/EOH
 /// <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);
 }