コード例 #1
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);
 }
コード例 #2
0
 /// <summary>
 /// Create a new Employee object.
 /// </summary>
 /// <param name="businessEntityID">Initial value of the BusinessEntityID property.</param>
 /// <param name="nationalIDNumber">Initial value of the NationalIDNumber property.</param>
 /// <param name="loginID">Initial value of the LoginID property.</param>
 /// <param name="jobTitle">Initial value of the JobTitle property.</param>
 /// <param name="birthDate">Initial value of the BirthDate property.</param>
 /// <param name="maritalStatus">Initial value of the MaritalStatus property.</param>
 /// <param name="gender">Initial value of the Gender property.</param>
 /// <param name="hireDate">Initial value of the HireDate property.</param>
 /// <param name="salariedFlag">Initial value of the SalariedFlag property.</param>
 /// <param name="vacationHours">Initial value of the VacationHours property.</param>
 /// <param name="sickLeaveHours">Initial value of the SickLeaveHours property.</param>
 /// <param name="currentFlag">Initial value of the CurrentFlag property.</param>
 /// <param name="rowguid">Initial value of the rowguid property.</param>
 /// <param name="modifiedDate">Initial value of the ModifiedDate property.</param>
 public static Employee CreateEmployee(global::System.Int32 businessEntityID, global::System.String nationalIDNumber, global::System.String loginID, global::System.String jobTitle, global::System.DateTime birthDate, global::System.String maritalStatus, global::System.String gender, global::System.DateTime hireDate, global::System.Boolean salariedFlag, global::System.Int16 vacationHours, global::System.Int16 sickLeaveHours, global::System.Boolean currentFlag, global::System.Guid rowguid, global::System.DateTime modifiedDate)
 {
     Employee employee = new Employee();
     employee.BusinessEntityID = businessEntityID;
     employee.NationalIDNumber = nationalIDNumber;
     employee.LoginID = loginID;
     employee.JobTitle = jobTitle;
     employee.BirthDate = birthDate;
     employee.MaritalStatus = maritalStatus;
     employee.Gender = gender;
     employee.HireDate = hireDate;
     employee.SalariedFlag = salariedFlag;
     employee.VacationHours = vacationHours;
     employee.SickLeaveHours = sickLeaveHours;
     employee.CurrentFlag = currentFlag;
     employee.rowguid = rowguid;
     employee.ModifiedDate = modifiedDate;
     return employee;
 }
コード例 #3
0
        private void FixupEmployee(Employee previousValue)
        {
            if (previousValue != null && previousValue.PurchaseOrderHeaders.Contains(this))
            {
                previousValue.PurchaseOrderHeaders.Remove(this);
            }

            if (Employee != null)
            {
                if (!Employee.PurchaseOrderHeaders.Contains(this))
                {
                    Employee.PurchaseOrderHeaders.Add(this);
                }
                if (EmployeeID != Employee.BusinessEntityID)
                {
                    EmployeeID = Employee.BusinessEntityID;
                }
            }
        }