示例#1
0
        public HourData(Hour hour)
            : this()
        {
            if (hour == null)
            {
                return;
            }

            this.HourId = hour.HourId;
            this.Date = hour.Date;
            this.Duration = hour.Duration;
            this.Task = new TaskData(hour.Task);
            this.Project = new ProjectData(hour.Project);
            this.User = new UserData(hour.User);
            this.Notes = hour.Notes;
            this.CreatedBy = new UserData(hour.CreatedByUser);
            this.CreatedDate = hour.CreatedDate;
        }
 /// <summary>
 /// Deprecated Method for adding a new object to the Hours EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToHours(Hour hour)
 {
     base.AddObject("Hours", hour);
 }
 /// <summary>
 /// Create a new Hour object.
 /// </summary>
 /// <param name="hourId">Initial value of the HourId property.</param>
 /// <param name="taskId">Initial value of the TaskId property.</param>
 /// <param name="userId">Initial value of the UserId property.</param>
 /// <param name="date">Initial value of the Date property.</param>
 /// <param name="duration">Initial value of the Duration property.</param>
 /// <param name="labels">Initial value of the Labels property.</param>
 /// <param name="isArchived">Initial value of the IsArchived property.</param>
 /// <param name="notes">Initial value of the Notes property.</param>
 /// <param name="modifiedBy">Initial value of the ModifiedBy property.</param>
 /// <param name="modifiedDate">Initial value of the ModifiedDate property.</param>
 /// <param name="createdBy">Initial value of the CreatedBy property.</param>
 /// <param name="createdDate">Initial value of the CreatedDate property.</param>
 /// <param name="projectId">Initial value of the ProjectId property.</param>
 public static Hour CreateHour(global::System.Int32 hourId, global::System.Int32 taskId, global::System.Int32 userId, global::System.DateTime date, global::System.Decimal duration, global::System.String labels, global::System.Boolean isArchived, global::System.String notes, global::System.Int32 modifiedBy, global::System.DateTime modifiedDate, global::System.Int32 createdBy, global::System.DateTime createdDate, global::System.Int32 projectId)
 {
     Hour hour = new Hour();
     hour.HourId = hourId;
     hour.TaskId = taskId;
     hour.UserId = userId;
     hour.Date = date;
     hour.Duration = duration;
     hour.Labels = labels;
     hour.IsArchived = isArchived;
     hour.Notes = notes;
     hour.ModifiedBy = modifiedBy;
     hour.ModifiedDate = modifiedDate;
     hour.CreatedBy = createdBy;
     hour.CreatedDate = createdDate;
     hour.ProjectId = projectId;
     return hour;
 }