예제 #1
0
        public static Subtask Create(ICreateParam param)
        {
            var subtask = new Subtask();

            subtask.Init(param);
            return(subtask);
        }
예제 #2
0
        public static ProjectType Create(ICreateParam param)
        {
            var type = new ProjectType();

            type.Init(param.Name, param.Description);
            return(type);
        }
예제 #3
0
        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);
        }
예제 #4
0
        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);
        }
예제 #5
0
        public static Project Create(ICreateParam createParam)
        {
            Project project = new Project();

            project.Init(createParam.Name, createParam.Description, createParam.ProjectType);
            return(project);
        }
예제 #6
0
        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);
        }
예제 #7
0
        public static MailJob Create(IApplicationUser user, int clientId, ICreateParam param)
        {
            var result = new MailJob();

            result.Init(user, clientId, param);
            return(result);
        }
예제 #8
0
 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();
 }
예제 #9
0
 public void Update(ICreateParam param)
 {
     this.Name        = param.Name;
     this.Description = param.Description;
     this.SetEdited();
 }