public Employee Clone() { Employee newEmp = new Employee(); newEmp._Id = this._Id; newEmp._CanLogin = this._CanLogin; newEmp._Enabled = this._Enabled; newEmp._FirstName = this._FirstName; newEmp._Id = this._Id; newEmp._IncomePercentage = this._IncomePercentage; newEmp._IsMale = this._IsMale; newEmp._LastName = this._LastName; newEmp._MonthlySalary = this._MonthlySalary; newEmp._Password = this._Password; newEmp._Phone1 = this._Phone1; newEmp._Phone2 = this._Phone2; newEmp._RoleId = this._RoleId; newEmp._Username = this._Username; //DataLayer.ChangeEntityState(newEmp,System.Data.EntityState.Detached); //newEmp.EntityKey = this.EntityKey; return newEmp; }
/// <summary> /// Create a new Employee object. /// </summary> /// <param name="id">Initial value of the Id property.</param> /// <param name="firstName">Initial value of the FirstName property.</param> /// <param name="lastName">Initial value of the LastName property.</param> /// <param name="isMale">Initial value of the IsMale property.</param> /// <param name="canLogin">Initial value of the CanLogin property.</param> /// <param name="roleId">Initial value of the RoleId property.</param> /// <param name="monthlySalary">Initial value of the MonthlySalary property.</param> /// <param name="incomePercentage">Initial value of the IncomePercentage property.</param> /// <param name="enabled">Initial value of the Enabled property.</param> /// <param name="userSettingsId">Initial value of the UserSettingsId property.</param> public static Employee CreateEmployee(global::System.Int32 id, global::System.String firstName, global::System.String lastName, global::System.Boolean isMale, global::System.Boolean canLogin, global::System.Int32 roleId, global::System.Int32 monthlySalary, global::System.Int32 incomePercentage, global::System.Boolean enabled, global::System.Int32 userSettingsId) { Employee employee = new Employee(); employee.Id = id; employee.FirstName = firstName; employee.LastName = lastName; employee.IsMale = isMale; employee.CanLogin = canLogin; employee.RoleId = roleId; employee.MonthlySalary = monthlySalary; employee.IncomePercentage = incomePercentage; employee.Enabled = enabled; employee.UserSettingsId = userSettingsId; return employee; }
/// <summary> /// Deprecated Method for adding a new object to the Employees EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToEmployees(Employee employee) { base.AddObject("Employees", employee); }