Example #1
0
        public Issue SaveIssue(Issue issue)
        {
            if (issue == null) throw new ArgumentNullException("issue");

            issue.LastModifiedBy = SecurityContext.CurrentAccount.ID;
            issue.LastModifiedOn = TenantUtil.DateTimeNow();
            if (issue.CreateBy == default(Guid)) issue.CreateBy = SecurityContext.CurrentAccount.ID;
            if (issue.CreateOn == default(DateTime)) issue.CreateOn = TenantUtil.DateTimeNow();
            return dao.SaveIssue(issue);
        }
Example #2
0
 public Issue SaveIssue(Issue issue)
 {
     var insert = Insert(table)
         .InColumns(columns)
         .Values(issue.ID, issue.ProjectID, issue.Title, issue.Description, issue.AssignedOn.ToString(), issue.DetectedInVersion, issue.CorrectedInVersion)
         .Values(issue.Priority, issue.Status)
         .Values(issue.CreateBy.ToString(), TenantUtil.DateTimeToUtc(issue.CreateOn), issue.LastModifiedBy.ToString(), TenantUtil.DateTimeToUtc(issue.LastModifiedOn))
         .Identity(1, 0, true);
     issue.ID = DbManager.ExecuteScalar<int>(insert);
     return issue;
 }