"景先生毕设|www.jxszl.com

C# DatabaseHelper类代码示例

2023-12-29 17:48编辑: www.jxszl.com景先生毕设
本文整理汇总了C#中DataBaseHelper类的典型用法代码示例。如果您正苦于以下问题:C# DataBaseHelper类的具体用法?C# DataBaseHelper怎么用?C# DataBaseHelper使用的例子? 这里精选的类代码示例或许可以为您提供帮助。 示例1: CreateUnitNameDropDownList public void CreateUnitNameDropDownList(IList _Units) { NpgsqlDataReader _dr = null; DataBaseHelper _db = new DataBaseHelper(Command, CommandType.Text); try { _dr = _db.ExecuteReader(returnParam()); _Units.Add(new Units(0, "Create Unit")); while (_dr.Read()) { _Units.Add(new Units(int.Parse(_dr[0].ToString()), _dr[1].ToString())); } } catch (Exception ex) { throw new Exception(" :: " + ex.Message); } finally { if (_dr != null) { _db = null; _dr = null; _Units = null; } } }
原文链接:http://www.jxszl.com/biancheng/C/556843.html