当前位置: 首页>>代码示例>>C#>>正文


C# IDBManager.CloseReader方法代码示例

本文整理汇总了C#中IDBManager.CloseReader方法的典型用法代码示例。如果您正苦于以下问题:C# IDBManager.CloseReader方法的具体用法?C# IDBManager.CloseReader怎么用?C# IDBManager.CloseReader使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IDBManager的用法示例。


在下文中一共展示了IDBManager.CloseReader方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: FetchIgnitionImpactList

        private void FetchIgnitionImpactList(int fz_id, string ig, IDBManager dbmgr)
        {
            string qryString = "SELECT * FROM viewFZIGNITIONIMPACT WHERE FZ_ID = @fz_id AND IG = @ig ORDER BY ITEM";
            FZIgnitionImpact item = new FZIgnitionImpact();
            ArrayList list = new ArrayList();

            PropertyInfo[] p = item.GetType().GetProperties();
            dbmgr.CreateParameters(2);
            dbmgr.AddParameters(0, "@fz_id", fz_id);
            dbmgr.AddParameters(1, "@ig", ig);
            dbmgr.ExecuteReader(CommandType.Text, qryString);

            while (dbmgr.DataReader.Read())
            {
                item = new FZIgnitionImpact();
                item = (FZIgnitionImpact)FetchObject(item, p, dbmgr);
                list.Add(item);
            }

            dbmgr.CloseReader();
            _firezone.impactlist = list;
        }
开发者ID:DanielSpalding,项目名称:Projects,代码行数:22,代码来源:FireZoneManager.cs

示例2: FetchFireArea

        private void FetchFireArea(int id, IDBManager dbmgr)
        {
            string qryLocal = "SELECT * FROM viewFALIST WHERE [email protected] ORDER BY FA";
            dbmgr.CreateParameters(1);
            dbmgr.AddParameters(0, "@id", id);
            dbmgr.ExecuteReader(CommandType.Text, qryLocal);
            if (dbmgr.DataReader.Read())
            {
                PropertyInfo[] p = _firearea.GetType().GetProperties();
                _firearea = (FireArea)FetchObject(_firearea, p, dbmgr);
            }

            dbmgr.CloseReader();
        }
开发者ID:DanielSpalding,项目名称:Projects,代码行数:14,代码来源:FireAreaManager.cs

示例3: FetchProtectionList

        private void FetchProtectionList(int id, IDBManager dbmgr)
        {
            string qryString = "SELECT * FROM viewFZPROTECTION WHERE FA_ID = @fa_id ORDER BY FZ, SYS_CATEGORY, SYS_NAME";
            FZProtection item = new FZProtection();
            ArrayList list = new ArrayList();

            PropertyInfo[] p = item.GetType().GetProperties();
            dbmgr.CreateParameters(1);
            dbmgr.AddParameters(0, "@fa_id", id);
            dbmgr.ExecuteReader(CommandType.Text, qryString);

            while (dbmgr.DataReader.Read())
            {
                item = new FZProtection();
                item = (FZProtection)FetchObject(item, p, dbmgr);
                list.Add(item);
            }

            dbmgr.CloseReader();
            _firearea.protectionlist = list;
        }
开发者ID:DanielSpalding,项目名称:Projects,代码行数:21,代码来源:FireAreaManager.cs

示例4: FetchRAList

        // procedure fetches recovery action list
        private void FetchRAList(int id, IDBManager dbmgr)
        {
            string qryString = "SELECT * FROM viewFACOMPRA AS r WHERE r.COMP_ID = @comp_id ORDER BY r.FA, r.RA_DISP";

            CompRA item = new CompRA();
            ArrayList list = new ArrayList();

            PropertyInfo[] p = item.GetType().GetProperties();					            // get property info for item
            dbmgr.CreateParameters(1);											            // create required parameters
            dbmgr.AddParameters(0, "@comp_id", id);								            // component id
            dbmgr.ExecuteReader(CommandType.Text, qryString);					            // execute query

            while (dbmgr.DataReader.Read())
            {
                item = new CompRA();											            // create new item
                item = (CompRA)FetchObject(item, p, dbmgr);
                list.Add(item);													            // add item to the ArrayList
            }

            dbmgr.CloseReader();
            _comp.ralist = list;												            // update object item list
        }
开发者ID:DanielSpalding,项目名称:Projects,代码行数:23,代码来源:NSCAManager.cs

示例5: FetchCascPowerList

        private void FetchCascPowerList(string analysis, int fa_id, IDBManager dbmgr)
        {
            FACascHit item = new FACascHit();											    // create new object type to be able to get property info
            ArrayList list = new ArrayList();										        // create new ArrayList to house objects

            PropertyInfo[] p = item.GetType().GetProperties();					            // get property info for item
            dbmgr.CreateParameters(2);											            // create parameters
            dbmgr.AddParameters(0, "@analysis", analysis);							            // fire area id
            dbmgr.AddParameters(1, "@fa_id", fa_id);
            dbmgr.ExecuteReader(CommandType.StoredProcedure, "dbo.FACASC_POWER_s"); // execute query

            while (dbmgr.DataReader.Read())
            {
                item = new FACascHit();											            // create new item
                item = (FACascHit)FetchObject(item, p, dbmgr);
                list.Add(item);													            // add item to the ArrayList
            }
            dbmgr.CloseReader();
            _firearea.cascpowerlist = list;											        // update item list
        }
开发者ID:DanielSpalding,项目名称:Projects,代码行数:20,代码来源:FireAreaManager.cs

示例6: FetchRoute

        private void FetchRoute(int id, IDBManager dbmgr)
        {
            string qryLocal = "SELECT * FROM viewROUTELIST WHERE [email protected] ORDER BY NODE";

            dbmgr.CreateParameters(1);
            dbmgr.AddParameters(0, "@id", id);
            dbmgr.ExecuteReader(CommandType.Text, qryLocal);
            if (dbmgr.DataReader.Read())
            {
                PropertyInfo[] p = _route.GetType().GetProperties();
                _route = (Route)FetchObject(_route, p, dbmgr);
            }

            dbmgr.CloseReader();
        }
开发者ID:DanielSpalding,项目名称:Projects,代码行数:15,代码来源:RouteManager.cs

示例7: Get_BD_ENDPT

        private string Get_BD_ENDPT(int id, IDBManager dbmgr)
        {
            string bd_endpt = "";
            string qryString;

            switch (_user.locaType)
            {
                case Constant.type_FR:
                    qryString = "SELECT * FROM viewBDENDPOINTS_FR AS e WHERE e.NODE_ID = @node_id ORDER BY e.BD_ENDPT";
                    break;
                default:
                    qryString = "SELECT * FROM viewBDENDPOINTS AS e WHERE e.NODE_ID = @node_id ORDER BY e.BD_ENDPT";
                    break;
            }
            dbmgr.CreateParameters(1);											            // create parameters
            dbmgr.AddParameters(0, "@node_id", id);								            // node id
            dbmgr.ExecuteReader(CommandType.Text, qryString);					            // execute query

            while (dbmgr.DataReader.Read())
            {
                if (bd_endpt == "")
                    bd_endpt = "'" + dbmgr.DataReader["BD_ENDPT"].ToString() + "'";
                else
                    bd_endpt = bd_endpt + ", " + "'" + dbmgr.DataReader["BD_ENDPT"].ToString() + "'";
            }

            dbmgr.CloseReader();
            return bd_endpt;
        }
开发者ID:DanielSpalding,项目名称:Projects,代码行数:29,代码来源:RouteManager.cs

示例8: FetchFireRoom

        // procedure fetches fire zone information
        private void FetchFireRoom(int id, IDBManager dbmgr)
        {
            string qryString = "SELECT * FROM viewFRLIST WHERE [email protected]";

            dbmgr.CreateParameters(1);
            dbmgr.AddParameters(0, "@id", id);
            dbmgr.ExecuteReader(CommandType.Text, qryString);
            if (dbmgr.DataReader.Read())
            {
                // get properties of object and fetch object
                PropertyInfo[] p = _fireroom.GetType().GetProperties();
                _fireroom = (FireRoom)FetchObject(_fireroom, p, dbmgr);
            }

            dbmgr.CloseReader();
        }
开发者ID:DanielSpalding,项目名称:Projects,代码行数:17,代码来源:FireRoomManager.cs

示例9: FetchRouteList

        private void FetchRouteList(int id, IDBManager dbmgr)
        {
            string qryString = "SELECT DISTINCT RM_ID, RM, FZ_ID, FZ, NODE_ID, NODE FROM viewFRDATA WHERE NODE IS NOT NULL AND [email protected]_id " +
                "UNION " +
                "SELECT DISTINCT RM_ID, RM, FZ_ID, FZ, NODE_ID, NODE FROM viewROUTELOCA_FR WHERE NODE_ID IS NOT NULL AND [email protected]_id " +
                "ORDER BY NODE";

            FRoute item = new FRoute();
            ArrayList list = new ArrayList();

            PropertyInfo[] p = item.GetType().GetProperties();					            // get property info for item
            dbmgr.CreateParameters(1);											            // create required parameters
            dbmgr.AddParameters(0, "@rm_id", id);								            // component id
            dbmgr.ExecuteReader(CommandType.Text, qryString);					            // execute query

            while (dbmgr.DataReader.Read())
            {
                item = new FRoute();											                // create new item
                item = (FRoute)FetchObject(item, p, dbmgr);
                list.Add(item);													            // add item to ArrayList
            }

            dbmgr.CloseReader();
            _fireroom.routelist = list;												        // update object item list
        }
开发者ID:DanielSpalding,项目名称:Projects,代码行数:25,代码来源:FireRoomManager.cs

示例10: FetchDrawingList

        // procedure fetches drawings given a component id
        private void FetchDrawingList(int id, IDBManager dbmgr)
        {
            string qryString = "SELECT * FROM viewCOMPDWGS cd WHERE cd.COMP_ID = @comp_id AND cd.DWGTYPE_desc = 'Other' ORDER BY cd.DWG_REF, cd.DWG_REV";
            //string qryString = "SELECT * FROM viewCOMPDWGS cd WHERE cd.COMP_ID = @comp_id AND DWGTYPE_ID <= 4 ORDER BY cd.DWGTYPE_ID, cd.DWG_REF, cd.DWG_REV";

            CompDwg item = new CompDwg();
            ArrayList list = new ArrayList();

            PropertyInfo[] p = item.GetType().GetProperties();					            // get property info for item
            dbmgr.CreateParameters(1);											            // create parameters
            dbmgr.AddParameters(0, "@comp_id", id);								            // component id
            dbmgr.ExecuteReader(CommandType.Text, qryString);					            // execute query

            while (dbmgr.DataReader.Read())
            {
                item = new CompDwg();											            // create new item
                item = (CompDwg)FetchObject(item, p, dbmgr);
                list.Add(item);													            // add item to the ArrayList
            }

            dbmgr.CloseReader();
            _comp.drawinglist = list;												        // update object item list
        }
开发者ID:DanielSpalding,项目名称:Projects,代码行数:24,代码来源:ComponentManager.cs

示例11: FetchComponentList

        private void FetchComponentList(int id, IDBManager dbmgr)
        {
            string qryString = "SELECT DISTINCT RM_ID, RM, FZ_ID, FZ, COMP_ID, COMP, dbo.IN_FR(COMP_ID, FZ_ID) AS IN_FZ FROM viewFRDATA " +
                "WHERE COMP_SSD_REQ=1 AND CABLE_SSD_REQ=1 AND COMP IS NOT NULL AND [email protected]_id ORDER BY COMP";

            FComp item = new FComp();
            ArrayList list = new ArrayList();

            PropertyInfo[] p = item.GetType().GetProperties();					            // get property info for item
            dbmgr.CreateParameters(1);											            // create required parameters
            dbmgr.AddParameters(0, "@rm_id", id);								            // component id
            dbmgr.ExecuteReader(CommandType.Text, qryString);					            // execute query

            while (dbmgr.DataReader.Read())
            {
                item = new FComp();											            // create new item
                item = (FComp)FetchObject(item, p, dbmgr);
                list.Add(item);													            // add item to ArrayList
            }

            dbmgr.CloseReader();
            _fireroom.componentlist = list;												    // update object item list
        }
开发者ID:DanielSpalding,项目名称:Projects,代码行数:23,代码来源:FireRoomManager.cs

示例12: FetchUser

        // fetches user information
        private void FetchUser(object obj, IDBManager dbmgr)
        {
            string qryLocal = "SELECT * FROM USERLIST WHERE [email protected]";
            _user = (User)obj;

            dbmgr.CreateParameters(1);
            dbmgr.AddParameters(0, "@name", _user.name);
            dbmgr.ExecuteReader(CommandType.Text, qryLocal);

            if (dbmgr.DataReader.Read())
            {
                // get properties of object and fetch object
                PropertyInfo[] p = _user.GetType().GetProperties();
                _user = (User)FetchObject(_user, p, dbmgr);
            }
            else
            {
                _user.initial = "";
                _user.password = null;
            }

            dbmgr.CloseReader();
        }
开发者ID:DanielSpalding,项目名称:Projects,代码行数:24,代码来源:UserManager.cs

示例13: FetchAccessList

        // fetches user access list
        private void FetchAccessList(IDBManager dbmgr)
        {
            string qryString = "SELECT * FROM USERLIST ORDER BY NAME";

            User item = new User();
            ArrayList list = new ArrayList();

            PropertyInfo[] p = item.GetType().GetProperties();
            dbmgr.ExecuteReader(CommandType.Text, qryString);

            while (dbmgr.DataReader.Read())
            {
                item = new User();
                item = (User)FetchObject(item, p, dbmgr);
                list.Add(item);
            }

            dbmgr.CloseReader();
            _accesslist = list;
        }
开发者ID:DanielSpalding,项目名称:Projects,代码行数:21,代码来源:UserManager.cs

示例14: FetchIgnitionList

        private void FetchIgnitionList(int id, IDBManager dbmgr)
        {
            string qryString = "SELECT * FROM viewFZIGNITION WHERE FZ_ID = @fz_id ORDER BY IG";
            FZIgnition item = new FZIgnition();
            ArrayList list = new ArrayList();

            PropertyInfo[] p = item.GetType().GetProperties();
            dbmgr.CreateParameters(1);
            dbmgr.AddParameters(0, "@fz_id", id);
            dbmgr.ExecuteReader(CommandType.Text, qryString);

            while (dbmgr.DataReader.Read())
            {
                item = new FZIgnition();
                item = (FZIgnition)FetchObject(item, p, dbmgr);
                list.Add(item);
            }

            dbmgr.CloseReader();
            _firezone.ignitionlist = list;
        }
开发者ID:DanielSpalding,项目名称:Projects,代码行数:21,代码来源:FireZoneManager.cs

示例15: FetchCableList

        private void FetchCableList(int id, IDBManager dbmgr)
        {
            string qryString = "SELECT * FROM viewCABROUTE_CHKD c WHERE c.NODE_ID = @node_id ORDER BY c.CABLE";
            CabRoute item = new CabRoute();							                        // create new object type to be able to get property info
            ArrayList list = new ArrayList();										        // create new ArrayList to house objects
            PropertyInfo[] p = item.GetType().GetProperties();					            // get property info for item

            dbmgr.CreateParameters(1);											            // create parameters
            dbmgr.AddParameters(0, "@node_id", id);								            // node id
            dbmgr.ExecuteReader(CommandType.Text, qryString);					            // execute query

            while (dbmgr.DataReader.Read())
            {
                item = new CabRoute();											            // create new item
                item = (CabRoute)FetchObject(item, p, dbmgr);
                list.Add(item);													            // add item to the ArrayList
            }

            dbmgr.CloseReader();
            _route.cablelist = list;										                // update item list
        }
开发者ID:DanielSpalding,项目名称:Projects,代码行数:21,代码来源:RouteManager.cs


注:本文中的IDBManager.CloseReader方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。