コード例 #1
0
        /// <summary>
        /// 获取指定文件夹下的所有方案文件名称
        /// </summary>
        /// <param name="PlanType">文件夹名称</param>
        /// <param name="TaiType">台体类型0-三相台,1-单相台</param>
        /// <returns></returns>
        public static List <PlanModel.Scheme_Check> getFileNamesFromMDB(string PlanType, int TaiType)
        {
            Plan_Scheme_Check plFANames = new Plan_Scheme_Check(TaiType, "All");
            string            strErr    = "";

            //List<PlanModel.Scheme_Check> modScCk = plFANames.GetList("", out strErr);
            return(plFANames.GetList("", out strErr));
        }
コード例 #2
0
        ///// <summary>
        ///// 加载总方案信息,从XML文件
        ///// </summary>
        //private void LoadFromXml()
        //{
        //    _Plan = new List<StFAGroup>();
        //    string _ErrorString = "";
        //    XmlNode _XmlNode = clsXmlControl.LoadXml(_FAPath, out _ErrorString);
        //    XmlNode canBeModifyNode = null;
        //    if (_ErrorString != "")
        //        return;
        //    ///在方案Group根节点增加isCanModofy属性节点(属性为1时可以编辑),如果不存在该属性,默认为1,数据库:等于-1,是模板,禁止编辑
        //    canBeModifyNode = _XmlNode.Attributes.GetNamedItem("isCanModify");
        //    if (canBeModifyNode != null)
        //    {
        //        isCanModify = canBeModifyNode.Value.ToString() == "1";
        //        //System.Windows.Forms.MessageBox.Show((isCanModify) ? "显示" : "不显示");
        //    }
        //    for (int _i = 0; _i < _XmlNode.ChildNodes.Count; _i++)
        //    {
        //        StFAGroup _FA = new StFAGroup();
        //        _FA.FAType = (Cus_FAGroup)int.Parse(_XmlNode.ChildNodes[_i].Attributes["Name"].Value);
        //        _FA.FAName = _XmlNode.ChildNodes[_i].ChildNodes[0].Value;

        //        _Plan.Add(_FA);
        //    }
        //    return;
        //}
        /// <summary>
        /// 加载总方案信息,从数据库文件
        /// </summary>
        private void LoadFromMDB()
        {
            _Plan = new List <StFAGroup>();
            string                        _ErrorString = "";
            Plan_Scheme_Check             dbCheck      = new Plan_Scheme_Check(0, "");
            List <PlanModel.Scheme_Check> _XmlNode     = dbCheck.GetList("", out _ErrorString);

            if (_ErrorString != "")
            {
                return;
            }
            int lstCount = _XmlNode.Count;

            for (int i = 0; i < lstCount; i++)
            {
                StFAGroup _FA = new StFAGroup();
                _FA.FAType = (Cus_FAGroup)(_XmlNode[i].schemeID);
                _FA.FAName = _XmlNode[i].chrPlanName;

                _Plan.Add(_FA);
            }
            ///在方案总表中,chrSchemeStatus该属性,默认为0,可以编辑;等于1,禁止编辑;等于-1,是模板,禁止编辑
            //canBeModifyNode = _XmlNode.Attributes.GetNamedItem("isCanModify");
            //if (canBeModifyNode != null)
            //{
            //    isCanModify = canBeModifyNode.Value.ToString() == "1";
            //    //System.Windows.Forms.MessageBox.Show((isCanModify) ? "显示" : "不显示");
            //}
            //for (int _i = 0; _i < _XmlNode.ChildNodes.Count; _i++)
            //{
            //    StFAGroup _FA = new StFAGroup();
            //    _FA.FAType = (Cus_FAGroup)int.Parse(_XmlNode.ChildNodes[_i].Attributes["Name"].Value);
            //    _FA.FAName = _XmlNode.ChildNodes[_i].ChildNodes[0].Value;

            //    _Plan.Add(_FA);
            //}
            return;
        }/// <summary>