Ejemplo n.º 1
0
 public void init()
 {
     if (this.IsInit)
     {
         if (this.m_Parent.ProType.Contains("安装专业"))
         {
             string  fs = _Common.Application.Global.AppFolder + "库文件\\子目增加费\\" + getFileName(this.m_Parent.PrfType);
             DataSet ds = CFiles.BinaryDeserializeForLib(fs);
             if (ds.Tables.Count > 0)
             {
                 this.m_DataSource = ds.Tables[0].Copy();
                 if (!this.m_DataSource.Columns.Contains("Check"))
                 {
                     this.m_DataSource.Columns.Add("Check", typeof(bool));
                     for (int i = 0; i < this.m_DataSource.Rows.Count; i++)
                     {
                         if (this.m_DataSource.Rows[i]["IsCheck"].ToString() == "1")
                         {
                             this.m_DataSource.Rows[i]["Check"] = true;
                         }
                         else
                         {
                             this.m_DataSource.Rows[i]["Check"] = false;
                         }
                     }
                 }
                 this.m_IsInit = false;
             }
         }
         else
         {
             this.m_DataSource = new DataTable();
         }
     }
 }
Ejemplo n.º 2
0
        /// <summary>
        /// 读取系统使用的模板文件
        /// </summary>
        public void LoadFiles()
        {
            string fs = this.AppFolder + "config\\" + "模板.qtsx";

            this.m_TempList = CFiles.BinaryDeserializeForLib(fs);
            //为模板添加自增长列
            foreach (DataTable table in this.m_TempList.Tables)
            {
                table.Columns["ID"].AutoIncrement     = true;
                table.Columns["ID"].AutoIncrementSeed = 0;
                table.Columns["ID"].AutoIncrementStep = 1;
            }


            //措施项目模板的读取
            this.m_MeasuresList = CFiles.BinaryDeserializeForLib(this.AppFolder + "config\\" + "措施项目模板.qtsx");
            this.m_变量对应表        = CFiles.BinaryDeserializeForLib(this.AppFolder + "config\\" + "变量对应表.qtsx");
            this.m_自动报价         = CFiles.BinaryDeserializeForLib(this.AppFolder + "config\\" + "自动报价.qtsx");
            this.m_工程设置         = CFiles.BinaryDeserializeForLib(this.AppFolder + "config\\" + "工程说明.qtsx");
        }