public RequirementDetailForm(PresentationModel presentationModel, Requirement requirement)
 {
     InitializeComponent();
     _presentationModel = presentationModel;
     type = UserInterfaceForm.FunctionalType.Hide;
     RefreshRequirementDetail(requirement);
 }
 public ProjectMainForm(PresentationModel presentationModel, Project project)
 {
     InitializeComponent();
     this._presentationModel = presentationModel;
     RefreshProjectDetail(project);
     type = UserInterfaceForm.FunctionalType.Hide;
     CheckPriority();
 }
 public TestDetailForm(PresentationModel presentationModel,Test test)
 {
     InitializeComponent();
     _presentationModel = presentationModel;
     _test = test;
     _arrayList = new ArrayList();
     type = UserInterfaceForm.FunctionalType.Hide;
     RefreshTestDetail(test);
     CheckPriority();
 }
 public TestListForm(PresentationModel presentationModel, Project project)
 {
     InitializeComponent();
     this._presentationModel = presentationModel;
     this._project = project;
     _arrayList = new ArrayList();
     type = UserInterfaceForm.FunctionalType.Hide;
     testListDataGridView.Columns[2].Visible = false;
     RefreshTestList();
     CheckPriority();
 }
 public OthersForm(PresentationModel presentationModel, Project project)
 {
     InitializeComponent();
     _project = project;
     _presentationModel = presentationModel;
     _functionalType = UserInterfaceForm.FunctionalType.Hide;
     type = UserInterfaceForm.FunctionalType.Hide;
     GetRequirementByProject();
     GetNoAssociatedTestCaseByProjectId();
     GetNoAssociatedRequirementByProjectId();
 }
 public RequirementListForm(PresentationModel presentationModel, Project project)
 {
     InitializeComponent();
     this._presentationModel = presentationModel;
     this._project = project;
     this.requirementListDataGridView.ClearSelection();
     type = UserInterfaceForm.FunctionalType.Hide;
     _arrayList = new ArrayList();
     requirementListDataGridView.Columns[2].Visible = false;
     requirementListDataGridView.Columns[3].Visible = false;
     GetRequirementByProject();
     CheckPriority();
 }
 private async void CheckPriority()
 {
     JObject jObject = await _presentationModel.GetPriority(_test.ProjectID);
     if (jObject["priority_type_name"].ToString().Equals("Owner") ||
         jObject["priority_type_name"].ToString().Equals("Manager"))
     {
         type = UserInterfaceForm.FunctionalType.Edit;
         _presentationModel.SetFunctionalButton(type);
     }
 }
 private async void CheckPriority()
 {
     JObject jObject = await _presentationModel.GetPriority(_requirement.ProjectID);
     if (jObject["priority_type_name"].ToString().Equals("Owner") ||
         jObject["priority_type_name"].ToString().Equals("Manager"))
     {
         type = UserInterfaceForm.FunctionalType.Edit;
         _presentationModel.SetFunctionalButton(type);
     }
     else if (jObject["priority_type_name"].ToString().Equals("Customer"))
     {
         if (_requirement.Status.ID == OPEN_ID && _requirement.Owner.ID == _presentationModel.GetUID())
         {
             type = UserInterfaceForm.FunctionalType.Edit;
             _presentationModel.SetFunctionalButton(type);
         }
     }
 }
 private async void CheckPriority()
 {
     JObject jObject = await _presentationModel.GetPriority(_project.ID);
     if (jObject["priority_type_name"].ToString().Equals("Owner") ||
         jObject["priority_type_name"].ToString().Equals("Manager"))
     {
         type = UserInterfaceForm.FunctionalType.New;
         testListDataGridView.Columns[2].Visible = true;
         _presentationModel.SetFunctionalButton(type);
     }
 }
 private async void CheckPriority()
 {
     JObject jObject = await _presentationModel.GetPriority(_project.ID);
     if (jObject["priority_type_name"].ToString().Equals("Owner") ||
         jObject["priority_type_name"].ToString().Equals("Manager"))
     {
         type = UserInterfaceForm.FunctionalType.Edit;
         _presentationModel.SetFunctionalButton(this.GetFunctionalType());
         CreateDataGridViewCell(_RtoRDataGridView, rList, rList, false);
         GetRequirementToRequirementRelationByProjectId();
         CreateDataGridViewCell(_RtoTDataGridView, rList, tList, false);
         GetRequirementToTestRelationByProjectId();
     }
 }
 private void _othersTabControl_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (_othersTabControl.SelectedTab == RtoTTabPage)
     {
         _functionalType = type;
     }
     else if (_othersTabControl.SelectedTab == RtoRTabPage)
     {
         _functionalType = type;
     }
     else
     {
         _functionalType = UserInterfaceForm.FunctionalType.Hide;
     }
     _presentationModel.SetFunctionalButton(this.GetFunctionalType());
 }