HN.DAL/Voucher.cs
(开头部分) 20KB这里只显示每个文件的开头 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-04-17
/// </summary>
public class Voucher
{
#region 判断是否存在 Exists(object tran, long VoID)
/// <summary>
/// 判断是否存在
/// Author 2016-04-17
/// </summary>
public bool Exists(object tran, long VoID)
{
StringBuilder strSql = new StringBuilder();
strSql.Append("select count(1) from Voucher");
strSql.Append(" where ");
strSql.Append(" VoID = @VoID ");
SqlParameter[] parameters = {
new SqlParameter("@VoID", SqlDbType.BigInt)
};
parameters[0].Value = VoID;
object obj = SQLHelper.ExecuteScalar((SqlTransaction)tran, strSql.ToString(), parameters);
return obj.ToString() == "0" ? false : true;
}
#endregion
#region 增加一条数据 Add(object tran,VoucherInfo model)
/// <summary>
/// 增加一条数据
/// Author 2016-04-17
/// </summary>
public bool Add(object tran, VoucherInfo model)
{
StringBuilder strSql = new StringBuilder();
strSql.Append("insert into Voucher(");
strSql.Append("OrgID,VoWords,No,VoNo,VoDate,AttachNum,BookName,AuditStatus,AuditID,AuditName,AuditDate,AuditIdea,CreateID,CreateName,CreateDate,DbMoney,CrMoney");
strSql.Append(") values (");
strSql.Append("@OrgID,@VoWords,@No,@VoNo,@VoDate,@AttachNum,@BookName,@AuditStatus,@AuditID,@AuditName,@AuditDate,@AuditIdea,@CreateID,@CreateName,@CreateDate,@DbMoney,@CrMoney");
strSql.Append(") ");
SqlParameter[] parameters = {
new SqlParameter("@OrgID", SqlDbType.Int,4) ,
new SqlParameter("@VoWords", SqlDbType.NVarChar,50) ,
new SqlParameter("@No", SqlDbType.Int,4) ,
new SqlParameter("@VoNo", SqlDbType.VarChar,20) ,
new SqlParameter("@VoDate", SqlDbType.Date,3) ,
new SqlParameter("@AttachNum", SqlDbType.Int,4) ,
new SqlParameter("@BookName", SqlDbType.NVarChar,50) ,
new SqlParameter("@AuditStatus", SqlDbType.Int,4) ,
new SqlParameter("@AuditID", SqlDbType.Int,4) ,
后面还有 408 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
