Example #1
0
        private void CreateProject()
        {
            var projectManager = new ProjectManager {MdiParent = this};
            projectManager.Show();

            var createProject = new CreateProject();
            if (createProject.ShowDialog() == DialogResult.Cancel)
                projectManager.Close();
            else
                projectManager.LoadProject(createProject.Tag as ProjectDto);
        }
Example #2
0
        /// <summary>
        /// Show the Information Project Screen
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void RibDataCaptionButtonClick(object sender, DevExpress.XtraBars.Ribbon.RibbonPageGroupEventArgs e)
        {
            #region Budget Request and State of the Project if both are null
            if (_project.BudgetRequest == null)
            {
                var request = new BudgetRequestRequest {BudgetResquestId = _project.BudgetRequestId};
                _project.BudgetRequest = new BudgetRequestFactory().GetBudgetRequest(request).BudgetRequest;
            }

            if (_project.State == null)
            {
                _project.State = new CommonFactory().GetStateList().StateList.Where(x => x.Id == _project.StateId).SingleOrDefault();
            }
            #endregion

            var projectView = new CreateProject {Tag = _project, Text = @"InformaciĆ³n del Projecto"};

            if (projectView.ShowDialog() == DialogResult.OK)
            {
                ClearProject();
                LoadProject(projectView.Tag as ProjectDto);
            }
        }