资源简介
ashx实例
C#语言
大家学着用ASHX文件
代码片段和文件信息
using Common.Utility;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
///
/// 供应商DAL
///
public class VendorDAL
{
public VendorDAL()
{
}
///
/// 根据编码或者条码或名称查找
///
/// 编码或者条码
/// 名称
/// 输出sql
///
public ArrayList GetByCodeAndName(string code string name out string sql)
{
sql = @“select * from
[Vendor]
where [cVCCode] like ‘%{0}%‘ and cVenName like ‘%{1}%‘“;
sql = string.Format(sql code name);
ArrayList dt = DBUtil.Select(sql);
return dt;
}
public ArrayList GetByCodeAndName(string invCode string invName)
{
string sql = ““;
return GetByCodeAndName(invCode invName out sql);
}
///
/// 根据类别编码查询
///
///
///
public ArrayList GetByClass(string cVCCode)
{
string sql = @“select a.* from
[Vendor] a
where cVCCode=‘{0}‘“;
sql = string.Format(sql cVCCode);
ArrayList dt = DBUtil.Select(sql);
return dt;
}
///
/// 返回所有存货
///
///
public ArrayList GetAll()
{
string sql = @“select * from [Vendor] “;
ArrayList dt = DBUtil.Select(sql);
return dt;
}
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2014-12-25 08:52 ASHX-DEMO\
文件 2169 2014-05-10 20:52 ASHX-DEMO\GetVendor.ashx
文件 1819 2014-05-10 20:24 ASHX-DEMO\VendorDAL.cs
评论
共有 条评论