BLL/RoomTypeBLL.cs

(开头部分) 21KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Common;
using System.Data;
using System.Data.SqlClient;


namespace BLL
{
    /// <summary>
    /// 数据访问类:T_RoomType
    /// </summary>
    public partial class RoomTypeBLL
    {

        #region  Method
        /// <summary>
        /// 是否存在该记录
        /// </summary>
        public bool Exists(int RoomTypeID)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("select count(1) from T_RoomType");
            strSql.Append(" where RoomTypeID=@RoomTypeID");
            SqlParameter[] parameters = {
					new SqlParameter("@RoomTypeID", SqlDbType.Int,4)
			};
            parameters[0].Value = RoomTypeID;

            return DbHelperSQL.Exists(strSql.ToString(), parameters);
        }


        /// <summary>
        /// 增加一条数据
        /// </summary>
        public int Add(Maticsoft.Model.T_RoomType model)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("insert into T_RoomType(");
            strSql.Append("RoomTypeCode,RoomTypeName,HotelID,ImgPath,BedNum,Price,MemberPrice,LMPrice,ForeGift,IsHour,HourPrice,Remark,AddDate,AlterDate,Status,IsIndex,ViewNum)");
            strSql.Append(" values (");
            strSql.Append("@RoomTypeCode,@RoomTypeName,@HotelID,@ImgPath,@BedNum,@Price,@MemberPrice,@LMPrice,@ForeGift,@IsHour,@HourPrice,@Remark,@AddDate,@AlterDate,@Status,@IsIndex,@ViewNum)");
            strSql.Append(";select @@IDENTITY");
            SqlParameter[] parameters = {
					new SqlParameter("@RoomTypeCode", SqlDbType.NVarChar,50),
					new SqlParameter("@RoomTypeName", SqlDbType.NVarChar,50),
					new SqlParameter("@HotelID", SqlDbType.Int,4),
					new SqlParameter("@ImgPath", SqlDbType.NVarChar,250),
					new SqlParameter("@BedNum", SqlDbType.Int,4),
					new SqlParameter("@Price", SqlDbType.Decimal,9),
					new SqlParameter("@MemberPrice", SqlDbType.Decimal,9),
					new SqlParameter("@LMPrice", SqlDbType.Decimal,9),
					new SqlParameter("@ForeGift", SqlDbType.Decimal,9),
					new SqlParameter("@IsHour", SqlDbType.Bit,1),
					new SqlParameter("@HourPrice", SqlDbType.Decimal,9),
					new SqlParameter("@Remark", SqlDbType.NVarChar,500),
					new SqlParameter("@AddDate", SqlDbType.DateTime),
后面还有 554 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。