DAL/OpenRoomInfoDAO.cs

(开头部分) 2KB

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

using System;
using System.Collections.Generic;
using System.Text;
using Model;
using System.Data;
using System.Data.SqlClient;

namespace DAL
{
    public class OpenRoomInfoDAO
    {
        private DataSet ds;
        SQLHelper sqlhelper = new SQLHelper();
        private SqlParameter para;


        //查询openroom表总记录数
        public int GetOpenRoomAllCount()
        {
            try
            {
                int count = sqlhelper.ReturnSQL("select count(*) from openroominfo");
                return count;
            }
            catch (Exception)
            {
                
                throw;
            }
        }
        //分页查询
        public DataSet GetRoomOpenInfo(int start, int limit)
        {

            try
            {
                ds = sqlhelper.GetDataSet("select top " + limit + " * from OpenRoomInfo where openroomid not in(select top " + start + " openroomid from openroominfo order by OpenTodayTime DESC) order by OpenTodayTime DESC,opentime DESC");
                return ds;
            }
            catch (Exception)
            {

                throw;
            }
        }

        //保存开房信息
        public int SaveOpenRoomInfo(OpenRoomInfoBean open)
        {
            try
            {
                SqlParameter[] sp ={ 
                    para=new SqlParameter("@Roomid",open.Roomid),
                    para=new SqlParameter("@GuestMoney",open.GuestMoney),
                    para=new SqlParameter("@Remark",open.Remark)
                };
                int count = sqlhelper.RunProc("proc_OpenRoomInfo",sp);
                return count;
            }
            catch (Exception)
后面还有 36 行代码,解锁后查看完整代码

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

AI 解读

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

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