1 Star 0 Fork 178

ai4china/蜀味正道(餐饮)

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
DBZhuJieMian.cs 1.34 KB
一键复制 编辑 原始数据 按行查看 历史
kbz 提交于 2022-03-25 08:56 . submint
using System;
using System.Collections.Generic;
using System.Text;
using Common;
using System.Data;
using System.Data.SqlClient;
namespace DA
{
public class DBZhuJieMian:IDisposable
{
string sql;
SqlHelpers sqlh;
SqlDataReader dr;
public DBZhuJieMian()
{
sqlh = new SqlHelpers ();
}
public DBZhuJieMian(SqlHelpers sh)
{
sqlh = sh;
}
public void Dispose()
{
sqlh.Dispose();
}
/// <summary>
/// DB 查询所有餐台类型
/// </summary>
/// <returns></returns>
public List<CRoomType> DBQueryZhuJieMian()
{
List<CRoomType> Lcrt = new List<CRoomType>();
sql = "select * from RoomType";
dr = sqlh.RQuery(sql,null,CommandType.Text );
while (dr.Read())
{
CRoomType crt = new CRoomType();
crt.CrtId1 =Convert.ToInt32 (dr["rtId"]);
crt.CrtName1 = dr["rtName"].ToString();
crt.CrtLeastCost1 = Convert.ToSingle(dr["rtLeastCost"]);
crt.CrtMostNumber1 = Convert.ToInt32(dr["rtMostNumber"]);
crt.CrtAmount1 = Convert.ToInt32(dr["rtAmount"]);
Lcrt.Add(crt);
}
dr.Close();
return Lcrt;
}
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C#
1
https://gitee.com/ai4china/foodApp.git
[email protected]:ai4china/foodApp.git
ai4china
foodApp
蜀味正道(餐饮)
master

搜索帮助