public void Clone(Job targetJob) { //Consts.writeEnteringMethodToDebugLog(System.Reflection.MethodBase.GetCurrentMethod().ReflectedType + "." + System.Reflection.MethodBase.GetCurrentMethod().Name); _jobID = targetJob.JobID; _buildingID = targetJob.BuildingID; _ownerID = targetJob.OwnerID; _workerID = targetJob.WorkerID; _jobName = String.Copy(targetJob.JobName); _startDate = new Gametime(); _startDate.CopyGameTime(targetJob.StartDate); _endDate = new Gametime(); _endDate.CopyGameTime(targetJob.EndDate); _startTime = new Gametime(); _startTime.CopyGameTime(targetJob.StartTime); _endTime = new Gametime(); _endTime.CopyGameTime(targetJob.EndTime); _payroll = targetJob.Payroll; _jobStatus = targetJob.JobStatus; //Consts.writeExitingMethodToDebugLog(System.Reflection.MethodBase.GetCurrentMethod().ReflectedType + "." + System.Reflection.MethodBase.GetCurrentMethod().Name); }
public Job(int jobID, int buildingID, int ownerID, int workerID, string jobName, Gametime startDate, Gametime endDate, Gametime startTime, Gametime endTime, int payroll, JobStatus jobStatus) { if (startDate <= endDate && startTime <= endTime) { _jobID = jobID; _buildingID = buildingID; _ownerID = ownerID; _workerID = workerID; _jobName = String.Copy(jobName); _startDate = new Gametime(); _startDate.CopyGameTime(startDate); _endDate = new Gametime(); _endDate.CopyGameTime(endDate); _startTime = new Gametime(); _startTime.CopyGameTime(startTime); _endTime = new Gametime(); _endTime.CopyGameTime(endTime); _payroll = payroll; _jobStatus = jobStatus; } }