Пример #1
0
 internal void Map(IssueDetailsModel issueDetailsModel, Issue issue)
 {
     issue.SubSystem = issueDetailsModel.SubSystem;
     issue.Customer = issueDetailsModel.Customer;
     issue.CreatedByUserId = issueDetailsModel.CreatedByUserId;
     issue.AssignedToUserId = issueDetailsModel.AssignedToUserId;
     issue.IssueTypeId = issueDetailsModel.IssueTypeId;
     issue.IssueStatusId = issueDetailsModel.IssueStatusId;
     issue.IssuePriorityId = issueDetailsModel.IssuePriorityId;
 }
Пример #2
0
        public void UpdateIssue(IssueDetailsModel issueDetailsModel)
        {
            var issue = EnsureFindSingle<Issue>(issueDetailsModel.IssueId);

            Map(issueDetailsModel, issue);

            issue.ModifiedOn = DateTimeOffset.Now;

            UpdateAndSave(issue);
        }
Пример #3
0
        public int CreateIssue(IssueDetailsModel issueDetailsModel, int currentUserId)
        {
            var issue = Map<Issue>(issueDetailsModel);

            var currentTime = DateTimeOffset.Now;

            issue.CreatedByUserId = currentUserId;
            issue.ReportedOn = currentTime;
            issue.CreatedOn = currentTime;
            issue.ModifiedOn = currentTime;

            return InsertAndSave(issue).Id;
        }
Пример #4
0
 internal void Map(Issue issue, IssueDetailsModel issueDetailsModel)
 {
     issueDetailsModel.IssueId = issue.Id;
     issueDetailsModel.Name = issue.Name;
     issueDetailsModel.SubSystem = issue.SubSystem;
     issueDetailsModel.Customer = issue.Customer;
     issueDetailsModel.ReportedOn = issue.ReportedOn;
     issueDetailsModel.CreatedOn = issue.CreatedOn;
     issueDetailsModel.ModifiedOn = issue.ModifiedOn;
     issueDetailsModel.CreatedByUserId = issue.CreatedByUserId;
     issueDetailsModel.AssignedToUserId = issue.AssignedToUserId;
     issueDetailsModel.IssueTypeId = issue.IssueTypeId;
     issueDetailsModel.IssueTypeName = IssueTypeModel.GetName(issue.IssueTypeId);
     issueDetailsModel.IssueStatusId = issue.IssueStatusId;
     issueDetailsModel.IssueStatusName = IssueStatusModel.GetName(issue.IssueStatusId);
     issueDetailsModel.IssuePriorityId = issue.IssuePriorityId;
     issueDetailsModel.IssuePriorityName =
         IssuePriorityModel.GetName(issue.IssuePriorityId);
 }