HN.DAL/LossInBills.cs
(开头部分) 16KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Text;
using System.Data.SqlClient;
using System.Collections.Generic;
using System.Data;
using HN.Utility;
using HN.Model;
namespace HN.DAL
{
/// <summary>
/// 损溢单明细
/// Author 2016-05-29
/// </summary>
public class LossInBills
{
#region 判断是否存在 Exists(object tran, long LbsID)
/// <summary>
/// 判断是否存在
/// Author 2016-05-29
/// </summary>
public bool Exists(object tran, long LbsID)
{
StringBuilder strSql = new StringBuilder();
strSql.Append("select count(1) from LossInBills");
strSql.Append(" where ");
strSql.Append(" LbsID = @LbsID ");
SqlParameter[] parameters = {
new SqlParameter("@LbsID", SqlDbType.BigInt)
};
parameters[0].Value = LbsID;
object obj = SQLHelper.ExecuteScalar((SqlTransaction)tran, strSql.ToString(), parameters);
return obj.ToString() == "0" ? false : true;
}
#endregion
#region 增加一条数据 Add(object tran,LossInBillsInfo model)
/// <summary>
/// 增加一条数据
/// Author 2016-05-29
/// </summary>
public bool Add(object tran, LossInBillsInfo model)
{
StringBuilder strSql = new StringBuilder();
strSql.Append("insert into LossInBills(");
strSql.Append("LbID,Mark,ProID,ProCode,ProName,Model,Unit,Color,Factory,Place,Quantity,WhID,TaxPrice,TaxMoney");
strSql.Append(") values (");
strSql.Append("@LbID,@Mark,@ProID,@ProCode,@ProName,@Model,@Unit,@Color,@Factory,@Place,@Quantity,@WhID,@TaxPrice,@TaxMoney");
strSql.Append(") ");
SqlParameter[] parameters = {
new SqlParameter("@LbID", SqlDbType.BigInt,8) ,
new SqlParameter("@Mark", SqlDbType.TinyInt,1) ,
new SqlParameter("@ProID", SqlDbType.Int,4) ,
new SqlParameter("@ProCode", SqlDbType.VarChar,50) ,
new SqlParameter("@ProName", SqlDbType.NVarChar,50) ,
new SqlParameter("@Model", SqlDbType.VarChar,100) ,
new SqlParameter("@Unit", SqlDbType.VarChar,50) ,
new SqlParameter("@Color", SqlDbType.VarChar,50) ,
new SqlParameter("@Factory", SqlDbType.NVarChar,50) ,
后面还有 322 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
