private void güncelleToolStripMenuItem_Click(object sender, EventArgs e) { ProjectAddForm projectAdd = new ProjectAddForm(); Project project = new Project(); project.ID = (int)dgvProjectList.SelectedRows[0].Cells["ID"].Value; project = _proBLL.Get(project.ID); projectAdd.MdiParent = this.MdiParent; projectAdd._updateProject = project; projectAdd.Show(); }
public void GetProject() { ProjectBLL projectBLL = new ProjectBLL(); var proj = projectBLL.Get(1); Assert.IsNotNull(proj); }
public void GetProjectbyID_Benchmark_Performance() { ProjectBLL projectBLL = new ProjectBLL(); for (var i = 0; i < 100; i++) { projectBLL.Get(i); } }
public void DeleteProject() { ProjectBLL projectBLL = new ProjectBLL(); projectBLL.DeleteProject(6); var proj = projectBLL.Get(6); Assert.IsNull(proj); }
public void UpdateProject() { ProjectBLL projectBLL = new ProjectBLL(); projObj.ProjectID = 3; projObj.ProjectName = "Updated_test"; projectBLL.UpdateProject(projObj); var updatedProj = projectBLL.Get(3); Assert.AreEqual("Updated_test", updatedProj.ProjectName); }
private void işiÜzerineAlToolStripMenuItem_Click(object sender, EventArgs e) { work.ID = (int)dgvWork.SelectedRows[0].Cells["ID"].Value; work = _workBLL.Get(work.ID); DateTime date = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day); if (work.StartDate == new DateTime(0001, 01, 01)) { work.StartDate = date; } work.WorkStatusID = 7; if (_workBLL.Update(work)) { MessageBox.Show("İş tarafınızca başlatılmıştır"); Project project = new Project(); project = _projectBLL.Get(work.ProjectID); if (project.StartDate == null) { project.StartDate = work.StartDate; _projectBLL.Update(project); } } }
private void button1_Click(object sender, EventArgs e) { try { Project project = _projectBLL.Get(ProjectId); project.isActive = false; project.ProjectFinishDate = DateTime.Now; if (_projectBLL.Update(project)) { MessageBox.Show("Proje Kapanmıştır. Artık Aktif Değildir."); ProjectsList(); } else { MessageBox.Show("Proje Kapanamamıştır. Hala Aktiftir!"); } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
public IHttpActionResult Get(int id) { ProjectBLL projectBLL = new ProjectBLL(); return(Ok(projectBLL.Get(id))); }
private void button1_Click(object sender, EventArgs e) { if (!flag) { _task = new Tasks(); if (string.IsNullOrWhiteSpace(txtTaskName.Text)) { errorProvider1.SetError(txtTaskName, "İş İsmi Boş Geçilemez"); return; } else { _task.Name = txtTaskName.Text; errorProvider1.SetError(txtTaskName, ""); } if (string.IsNullOrWhiteSpace(richTxtDescription.Text)) { errorProvider1.SetError(richTxtDescription, "Açıklama Kısmı Boş Geçilemez"); return; } else { _task.Description = richTxtDescription.Text; errorProvider1.SetError(richTxtDescription, ""); } _task.ProjectID = ProjectId; _task.EmployeeID = EmployeeId; _task.ManagerID = ManagerID; _task.StartDate = dateStartDate.Value.Date; _task.EndDate = dateEndTime.Value.Date; _task.StatusID = 1; var query = _taskBLL.GetAll().Select(x => new { x.ProjectID }); object VarMi; try { VarMi = _taskBLL.GetAll().FirstOrDefault(x => x.ProjectID == ProjectId).Name; } catch (Exception) { VarMi = null; } if (VarMi == null) { Project project = _projectBLL.Get(ProjectId); project.ProjectStartDate = DateTime.Today; _projectBLL.Update(project); } if (_taskBLL.Add(_task)) { MessageBox.Show("İş Oluşturulmuştur."); } else { MessageBox.Show("İş Oluşturulamadı"); } } else { MessageBox.Show("istekten iş oluşturma!"); _task = new Tasks(); if (string.IsNullOrWhiteSpace(txtTaskName.Text)) { errorProvider1.SetError(txtTaskName, "İş İsmi Boş Geçilemez"); return; } else { _task.Name = txtTaskName.Text; errorProvider1.SetError(txtTaskName, ""); } if (string.IsNullOrWhiteSpace(richTxtDescription.Text)) { errorProvider1.SetError(richTxtDescription, "Açıklama Kısmı Boş Geçilemez"); return; } else { _task.Description = richTxtDescription.Text; errorProvider1.SetError(richTxtDescription, ""); } _task.ProjectID = _projectID; _task.EmployeeID = EmployeeId; _task.ManagerID = ManagerID; _task.StartDate = dateStartDate.Value.Date; _task.EndDate = dateEndTime.Value.Date; _task.StatusID = 1; var query = _taskBLL.GetAll().Select(x => new { x.ProjectID }); object VarMi; try { VarMi = _taskBLL.GetAll().FirstOrDefault(x => x.ProjectID == ProjectId).Name; } catch (Exception) { VarMi = null; } if (VarMi == null) { Project project = _projectBLL.Get(ProjectId); project.ProjectStartDate = DateTime.Today; _projectBLL.Update(project); } if (_taskBLL.Add(_task)) { MessageBox.Show("İş Oluşturulmuştur"); } else { MessageBox.Show("İş Oluşturulamadı"); } CustomerRequest customerRequest = _customerRequestBLL.Get(_requestID); customerRequest.isActive = false; _customerRequestBLL.Update(customerRequest); MessageBox.Show("İş Oluşturma Başarılı"); } }