DA/DBProduct.cs
(开头部分) 9KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Common;
using System.Data;
using System.Data.SqlClient;
namespace DA
{
public class DBProduct:IDisposable
{
string sql;
SqlHelpers sqlh;
DataSet ds;
SqlDataReader dr;
public DBProduct()
{
sqlh = new SqlHelpers();
}
public DBProduct(SqlHelpers sh)
{
sqlh = sh;
}
public void Dispose()
{
sqlh.Dispose();
}
/// <summary>
/// 查询product
/// </summary>
/// <returns></returns>
public List<CProduct> DBProductQuery()
{
List<CProduct> lm = new List<CProduct>();
sql = "select * from Product";
dr = sqlh.RQuery(sql, null, CommandType.Text);
while (dr.Read())
{
CProduct cp = new CProduct();
cp.ProductTypeID1 = Convert.ToInt32(dr["ProductTypeID"]);
cp.ProductID1 = Convert.ToInt32(dr["ProductID"]);
cp.ProductName1 = dr["ProductName"].ToString();
cp.ProductBrand1 = dr["ProductBrand"].ToString();
cp.StoreID1 = dr["StoreID"].ToString();
cp.Vendor1 = dr["Vendor"].ToString();
cp.Unit1 = dr["Unit"].ToString();
try
{
cp.Price1 = Convert.ToDecimal(dr["ProductPrice"]);
cp.RetailPrice1 = Convert.ToDecimal(dr["RetailPrice"]);
cp.CreateDateTime1 = Convert.ToDateTime(dr["CreateDateTime"]);
}
catch (Exception oiu) { }
cp.CreateUserID= dr["CreateUserID"].ToString();
lm.Add(cp);
}
dr.Close();
return lm;
后面还有 171 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。