public static Subtask Create(ICreateParam param) { var subtask = new Subtask(); subtask.Init(param); return(subtask); }
public static ProjectType Create(ICreateParam param) { var type = new ProjectType(); type.Init(param.Name, param.Description); return(type); }
public static Assignment Create(ICreateParam param) { Assignment assignment = new Assignment(); assignment.Init(param.Name, param.Description, param.DatePlanned, param.DateDue, param.DurationPlannedAsTicks, param.Project); return(assignment); }
public static Entry Create(ICreateParam param) { var entry = new Entry(); entry.Init(param.Name, param.Comment, param.Started, param.Ended, param.Subtask, param.Project, param.DurationAsTicks); return(entry); }
public static Project Create(ICreateParam createParam) { Project project = new Project(); project.Init(createParam.Name, createParam.Description, createParam.ProjectType); return(project); }
protected void Init(IApplicationUser user, int?clientId, ICreateParam param) { base.Init(user, clientId); this.to = new MailAddressArray(); this.cc = new MailAddressArray(); this.bcc = new MailAddressArray(); this.replyTo = new MailAddressArray(); this.to.data = param.to.ToArray(); this.cc.data = param.cc?.ToArray(); this.bcc.data = param.bcc?.ToArray(); this.replyTo.data = param.replyTo?.ToArray(); this.body = param.body; this.subject = param.subject; this.priority = param.priority; this.attachments = new MailJobAttachmentArray(); foreach (IMailJobAttachment attachment in param.attachments) { this.attachments.Add(new MailJobAttachment(attachment)); } this.sendEarliest = param.sendEarliest; this.sendLatest = param.sendLatest; this.SetNextRun(user, this.sendEarliest ?? DateTime.Now); }
public static MailJob Create(IApplicationUser user, int clientId, ICreateParam param) { var result = new MailJob(); result.Init(user, clientId, param); return(result); }
private void Init(ICreateParam param) { this.Name = param.Name; this.Description = param.Description; this.Priority = param.Priority; this.Status = SubtaskStatus.NotYetDone; this.Entries = new HashSet <Entry>(); this.SetCreated(); }
public void Update(ICreateParam param) { this.Name = param.Name; this.Description = param.Description; this.SetEdited(); }