Ejemplo n.º 1
0
        /// <summary>
        /// 开启一个业务操作(项目管理)
        /// </summary>
        private void openProjects(_Business p_bus, bool ISTBS)
        {
            //项目窗体创建
            CWellComeProject form = new CWellComeProject();

            form.ModelChange += new ModelChangeHandler(form_ModelChange);
            //业务对象
            form.CurrentBusiness = p_bus;
            //指定项目对象
            form.FormBorderStyle = FormBorderStyle.None;
            form.Dock            = DockStyle.Fill;//设置样式是否填充整个PANEL
            //设置为非顶级控件
            form.TopLevel = false;
            //显示窗体
            form.Visible = true;
            //超创建项目
            form.MdiParent = MdiParent;
            if (ISTBS)
            {
                // DialogResult d= MsgBox.Show("导入成功,是否计算所有项目?", MessageBoxButtons.OKCancel);
                // if(d==DialogResult.OK)
                BackgroundWorker ProjWorker = new BackgroundWorker();
                ProjWorker.WorkerReportsProgress = true;
                ProjWorker.DoWork             += new DoWorkEventHandler(ProjWorker_DoWork);
                ProjWorker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(ProjWorker_RunWorkerCompleted);
                ProjWorker.RunWorkerAsync(p_bus);
                ProgressFrom p = new ProgressFrom(ProjWorker);
                p.ShowDialog();
                //(p_bus as _Pr_Business).CalculateForXml();
            }
        }
Ejemplo n.º 2
0
        public override void OnRemoveForm()
        {
            base.OnRemoveForm();
            CWellComeProject wcForm = (this.BusContainer as CWellComeProject);

            wcForm.AfterStatisticaled -= new AfterStatisticaledHandler(ProjectSummaryForm_DoStatistical);
        }
Ejemplo n.º 3
0
        public override void OnRemoveForm()
        {
            base.OnRemoveForm();
            CWellComeProject wcForm = (this.BusContainer as CWellComeProject);

            wcForm.AfterStatisticaled -= new AfterStatisticaledHandler(HuiZongProjectForm_DoStatistical);
            wcForm.BeforeStatistical  -= new BeforeStatisticalHandler(wcForm_BeforeStatistical);
        }
Ejemplo n.º 4
0
        public override void OnInitForm()
        {
            base.OnInitForm();
            CWellComeProject wcForm = (this.BusContainer as CWellComeProject);

            wcForm.BeforeStatistical  += new BeforeStatisticalHandler(wcForm_BeforeStatistical);
            wcForm.AfterStatisticaled += new AfterStatisticaledHandler(wcForm_AfterStatisticaled);
        }
Ejemplo n.º 5
0
        public override void OnInitForm()
        {
            base.OnInitForm();
            CWellComeProject wcForm = (this.BusContainer as CWellComeProject);

            wcForm.AfterStatisticaled += new AfterStatisticaledHandler(HuiZongProjectForm_DoStatistical);
            wcForm.BeforeStatistical  += new BeforeStatisticalHandler(wcForm_BeforeStatistical);
            DataSource.RowChanged     += new DataRowChangeEventHandler(DataSource_RowChanged);
        }
Ejemplo n.º 6
0
        public override void OnInitForm()
        {
            CWellComeProject wcForm = (this.BusContainer as CWellComeProject);

            /*wcForm.BeforeSave -= new BeforeSaveHandler(wcForm_BeforeSave);
             * wcForm.AfterSave -= new AfterSaveHandler(wcForm_AfterSave);
             * wcForm.BeforeSave += new BeforeSaveHandler(wcForm_BeforeSave);
             * wcForm.AfterSave += new AfterSaveHandler(wcForm_AfterSave);*/

            wcForm.AfterStatisticaled -= new AfterStatisticaledHandler(HuiZongProjectForm_DoStatistical);
            wcForm.AfterStatisticaled += new AfterStatisticaledHandler(HuiZongProjectForm_DoStatistical);
        }
Ejemplo n.º 7
0
        /// <summary>
        /// 创建一个新的单位工程选项卡(空工程)
        /// </summary>
        /// <param name="p_UnitProject">单位工程</param>
        public void CreateNewUnitProject(CWellComeProject p_Parent, _UnitProject p_UnitProject)
        {
            //如果选项卡已经存在设置为当前操作选中
            XtraTabPageEx xtp = null;

            xtp = this.Find(p_UnitProject);

            if (xtp == null)
            {
                xtp             = XtraTabPageEx.CreateInstance(p_Parent, p_UnitProject);
                xtp.UnitProject = p_UnitProject;

                //若已经存在当前选项卡则被调用
                this.TabPages.Add(xtp);
            }
            this.SelectedTabPage = xtp;
        }
Ejemplo n.º 8
0
        /// <summary>
        /// 创建项目欢迎页面
        /// </summary>
        /// <param name="p_Project">当前项目</param>
        /// <returns></returns>
        public static XtraTabPageEx CreateWellCome(_Projects p_Project)
        {
            XtraTabPageEx xtp = new XtraTabPageEx();

            xtp.m_XtraTabType = "项目指引";
            xtp.Text          = p_Project.Property.Basis.Name;
            xtp.ImageIndex    = 0;
            CWellComeProject form = new CWellComeProject();

            form.FormBorderStyle = FormBorderStyle.None;
            form.Dock            = DockStyle.Fill;//设置样式是否填充整个PANEL
            //设置为非顶级控件
            form.TopLevel = false;
            //显示窗体
            form.Visible = true;
            xtp.Controls.Add(form);
            return(xtp);
        }
Ejemplo n.º 9
0
        /// <summary>
        /// 获取一个(单位工程)选项卡对象
        /// </summary>
        /// <returns></returns>
        public static XtraTabPageEx CreateInstance(CWellComeProject p_Parent, _UnitProject p_UnitProject)
        {
            //如果不存在当前打开的工程文件对象则放入此工程

            /*if (_Common.Application.Global.Configuration.Bool_Temporary_UnitProject)
             * {
             *  if (!_Common.Application.Cache.Cache_Bak_Object.Contains(p_UnitProject))
             *  {
             *      _Common.Application.Cache.Cache_Bak_Object.Add(p_UnitProject);
             *  }
             * }*/


            XtraTabPageEx xtp = new XtraTabPageEx();

            xtp.m_XtraTabType = "单位工程";
            xtp.Dock          = DockStyle.Fill;//设置样式是否填充整个PANEL
            //创建新的应用窗体
            xtp.m_ProjectForm = new ProjectForm();
            //同步当前业务对象
            GLODSOFT.QDJJ.BUSINESS._Project_Statistics statistics = new GLODSOFT.QDJJ.BUSINESS._Project_Statistics(p_UnitProject, p_Parent.CurrentBusiness);
            statistics.Calculate();
            xtp.m_ProjectForm.CurrentBusiness = p_Parent.CurrentBusiness;
            p_UnitProject.NeedCalculate       = true;
            //活动的单位工程
            xtp.m_ProjectForm.Activitie = p_UnitProject;
            //设置父类容器
            xtp.m_ProjectForm.Parent_Projects = p_Parent;
            xtp.m_ProjectForm.FormBorderStyle = FormBorderStyle.None;
            xtp.m_ProjectForm.Dock            = DockStyle.Fill;//设置样式是否填充整个PANEL
            xtp.GetProjectForm.MainForm       = p_Parent.Parent as ApplicationForm;
            //设置为非顶级控件
            xtp.m_ProjectForm.TopLevel = false;
            //显示窗体
            xtp.m_ProjectForm.Visible = true;
            xtp.Text = p_UnitProject.Name;

            xtp.ImageIndex = 2;

            //当有新子列表被添加到工作区时激发
            xtp.m_ProjectForm.WorkPanel.ControlAdded += new ControlEventHandler(WorkPanel_ControlAdded);
            xtp.Controls.Add(xtp.m_ProjectForm);
            return(xtp);
        }
Ejemplo n.º 10
0
        /// <summary>
        /// 替换当前选项卡
        /// </summary>
        /// <param name="p_Parent"></param>
        /// <param name="p_UnitProject"></param>
        public void Replace(CWellComeProject p_Parent, _UnitProject p_UnitProject, int OldId)
        {
            //1.如果选项卡是当前打开的选项卡 重新添加页面数据
            //2.如果当前选项卡存在列表中 重新添加数据

            XtraTabPageEx xtp = this.Find(p_UnitProject, OldId);

            if (xtp == null)
            {
                return;
            }

            //APP.Methods.Init(p_UnitProject);
            //xtp.XtraTabType = "单位工程";
            //xtp.Dock = DockStyle.Fill;//设置样式是否填充整个PANEL
            GLODSOFT.QDJJ.BUSINESS._Project_Statistics statistics = new GLODSOFT.QDJJ.BUSINESS._Project_Statistics(p_UnitProject, p_Parent.CurrentBusiness);
            statistics.Calculate();
            //创建新的应用窗体
            xtp.GetProjectForm = new ProjectForm();
            xtp.UnitProject    = p_UnitProject;
            //同步当前业务对象
            xtp.GetProjectForm.CurrentBusiness = p_Parent.CurrentBusiness;
            p_UnitProject.NeedCalculate        = true;
            //活动的单位工程
            xtp.GetProjectForm.Activitie = p_UnitProject;

            //设置父类容器
            xtp.GetProjectForm.Parent_Projects = p_Parent;
            xtp.GetProjectForm.FormBorderStyle = FormBorderStyle.None;
            xtp.GetProjectForm.Dock            = DockStyle.Fill;//设置样式是否填充整个PANEL
            //设置为非顶级控件
            xtp.GetProjectForm.TopLevel = false;
            //显示窗体
            xtp.GetProjectForm.Visible = true;
            xtp.Text = p_UnitProject.Name;
            xtp.GetProjectForm.dp_Function.Visibility = DevExpress.XtraBars.Docking.DockVisibility.Hidden;
            //当前存在的重新加载数据
            //删除原来的Project对象
            xtp.Controls.Remove(xtp.Controls[0]);
            //添加新的Project对象
            xtp.Controls.Add(xtp.GetProjectForm);
        }