Ejemplo n.º 1
0
        public IIssue CreateIssue(string title, string description)
        {
            var issue = new BaseIssue
            {
                Title       = title,
                Description = description
            };

            return(issue);
        }
Ejemplo n.º 2
0
 public static BaseIssueViewModel ToViewModel(this BaseIssue i) => new BaseIssueViewModel
 {
     Id            = i.Id,
     User          = i.User,
     IssueTS       = i.IssueTS,
     IssueTypeId   = i.IssueTypeId,
     CategoryId    = i.CategoryId,
     LongDescr     = i.LongDescr,
     IssueStatusId = i.IssueStatusId,
     SolveTS       = i.SolveTS,
     SolveDescr    = i.SolveDescr,
     SolveUser     = i.SolveUser
 };
Ejemplo n.º 3
0
        public IActionResult Edit(BaseIssue baseIssue)
        {
            if (baseIssue is null)
            {
                throw new System.ArgumentNullException(nameof(baseIssue));
            }

            //ПШ Делаем проверку модели, если не соответствует отправляем пользователю обратно
            if (!ModelState.IsValid)
            {
                return(View(baseIssue));
            }

            //var id = baseIssue.Id;
            //ПШ если Id нулевой, то это новый сотрудник и мы его добавляем, иначе редактируем
            //if (id != 0)
            _BaseIssuesData.CreateBaseIssueAsync(baseIssue);

            return(RedirectToAction("Index"));
        }
Ejemplo n.º 4
0
 public async Task <BaseIssue> CreateBaseIssueAsync(BaseIssue baseIssue)
 {
     return(new BaseIssue());
 }