private void Guncelle(string durumName)
        {
            var durum     = _durumService.GetirAdIle(durumName);
            var taskState = _taskStateService.GetirIdile(_Id);
            var task      = _taskService.GetirIdile(taskState.TaskId);

            _taskService.Guncelle(new ScrumTaskBoard.Entities.Concrete.Task
            {
                Id          = task.Id,
                Name        = task.Name,
                Description = task.Description,
                Note        = task.Note,
                TaskDate    = task.TaskDate,
                PreDate     = task.PreDate,
                FinishDate  = task.FinishDate,
                UserId      = task.UserId,
                DurumId     = durum.Id
            });

            _taskStateService.Guncelle(new TaskState
            {
                Id          = _Id,
                DurumId     = durum.Id,
                Description = taskState.Description,
                UserId      = taskState.UserId,
                TaskId      = taskState.TaskId
            });
        }
Exemplo n.º 2
0
        private void btnGuncelle_Click(object sender, EventArgs e)
        {
            string userName  = cmbUser.Text;
            var    projeName = cmbProje.Text;
            var    proje     = _projeService.GetirAdIle(projeName);
            var    user      = _userService.GetirAdIle(userName);
            var    durum     = _durumService.GetirAdIle("Todo");
            var    taskState = _taskStateService.GetirByTaskId(_Id);

            if (user == null)
            {
                MessageBox.Show("Böyle Bir Kullanıcı Sistemde Yok...");
            }
            else if (proje == null)
            {
                MessageBox.Show("Böyle Bir Proje Sistemde Yok...");
            }
            else
            {
                if (!KontrolEt())
                {
                }
                else
                {
                    _taskService.Guncelle(new ScrumTaskBoard.Entities.Concrete.Task
                    {
                        Id          = _Id,
                        Name        = projeName,
                        Description = txtDescription.Text,
                        Note        = txtNotes.Text,
                        PreDate     = Convert.ToDateTime(datePreDate.Text),
                        FinishDate  = Convert.ToDateTime(dateFinishDate.Text),
                        UserId      = user.Id,
                        DurumId     = durum.Id,
                    });

                    _taskStateService.Guncelle(new ScrumTaskBoard.Entities.Concrete.TaskState
                    {
                        Id          = taskState.Id,
                        Description = txtDescription.Text,
                        TaskId      = _Id,
                        UserId      = user.Id,
                        DurumId     = durum.Id
                    });

                    MessageBox.Show("Task Başarıyla Güncellendi.");

                    FrmAnaMenu frmAnaMenu = new FrmAnaMenu();
                    frmAnaMenu.Show();
                    this.Hide();
                }
            }
        }