Example #1
0
        public ProInformation(bool IsNew)
        {
            if (IsNew)
            {
                this.m_Information = APP.UnInformation;
                this.m_Information.InformationTable = new _InformationTable(); //重新构造Form表
                this.m_Information.BuildTable();                               //重新构造清单定额表
            }
            switch (APP.UnInformation.InformationType)
            {
            case InformationType.建筑装饰:
                if (APP.Application.Global.DataTamp.工程信息表 == null || APP.Application.Global.DataTamp.工程信息表.Tables.Count < 1)
                {
                    APP.Application.Global.DataTamp.工程信息表 = APP.GoldSoftClient.GetServiceData("土建");
                }
                if (IsNew)
                {
                    APP.UnInformation.TreeTable = APP.Application.Global.DataTamp.工程信息表.Tables["TJ_节点显示"];
                }
                break;

            case InformationType.给排水雨水:
            case InformationType.采暖热源:
            case InformationType.燃气管道:
            case InformationType.工业管道:
            case InformationType.水灭火:
            case InformationType.气体灭火:
            case InformationType.泡沫灭火:
            case InformationType.消火栓:
            case InformationType.火灾报警:
            case InformationType.通风空调:
            case InformationType.电气设备:
            case InformationType.智能综合:
                if (APP.Application.Global.DataTamp.安装专业工程信息表 == null || APP.Application.Global.DataTamp.安装专业工程信息表.Tables.Count < 1)
                {
                    APP.Application.Global.DataTamp.安装专业工程信息表 = APP.GoldSoftClient.GetServiceData("安装");
                }
                if (IsNew)
                {
                    DataTable dtTemp     = APP.Application.Global.DataTamp.安装专业工程信息表.Tables["AZ_节点显示"];
                    int       TemplateID = -1;
                    try
                    {
                        TemplateID = Convert.ToInt32(this.m_Information.InformationType);
                        dtTemp.DefaultView.RowFilter = string.Format("TemplateID like '%,{0},%'", TemplateID.ToString());
                        APP.UnInformation.TreeTable  = dtTemp.DefaultView.ToTable();
                    }
                    catch { }
                }
                break;
            }
            this.m_Information = APP.UnInformation;

            InitializeComponent();
        }
Example #2
0
 public _Methods_Infomation(_UnitProject p_Unit, _Business p_bus)
 {
     m_Unit                 = p_Unit;
     this._UnInfo           = APP.UnInformation;
     this.m_CurrentBusiness = p_bus;
     method_Sub             = _Method_Sub.GetSub(this.m_CurrentBusiness, this.m_Unit);
     methods_Fixed          = new _Methods_Fixed(this.m_CurrentBusiness, this.m_Unit, null);
     dt = this.Unit.Property.Libraries.FixedLibrary.LibraryDataSet.Tables["材机表"].Copy();
     if (!dt.Columns.Contains("fl"))
     {
         dt.Columns.Add("fl", typeof(double));
     }
     if (!dt.Columns.Contains("SCDJ"))
     {
         dt.Columns.Add("SCDJ", typeof(double));
     }
     if (dt.PrimaryKey.Length == 0)
     {
         dt.PrimaryKey = new DataColumn[] { dt.Columns["CAIJBH"] };
     }
 }