DAL/DormInfoService.cs

(开头部分) 2KB

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

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

namespace Jackone
{
    public class DormInfoService
    {
        /// <summary>
        /// 
        /// </summary>
        /// <param name="dormid"></param>
        /// <returns></returns>
        public static DataTable GetDorm(string dormid)
        {
            string StrSql = @"SELECT * FROM DormInfo
            WHERE dormid=@dormid ";
            List<SqlParameter> Params = new List<SqlParameter>();
            SqlParameter para = new SqlParameter("@dormid", SqlDbType.NVarChar);
            para.Value = dormid;
            Params.Add(para);
            DataTable tb = SqlHelper.QueryTable(CommandType.Text, StrSql, Params.ToArray());

            return tb;
        }

        public static DataTable GetValidDormInfoByInStu(string dormid)
        {
            List<SqlParameter> Params = new List<SqlParameter>();
            string StrSql = @"SELECT * FROM DormInfo
            WHERE dormbednum >innum";
            if (dormid.Trim().Length > 0)
            {
                StrSql = @"SELECT * FROM DormInfo
            WHERE dormbednum >innum AND dormid=@dormid ";


                SqlParameter para = new SqlParameter("@dormid", SqlDbType.NVarChar);
                para.Value = dormid;
                Params.Add(para);
            }

         
            DataTable tb = SqlHelper.QueryTable(CommandType.Text, StrSql, Params.ToArray());

            return tb;
        }

        public static DataTable GetAllDorm()
        {
            string StrSql = @"SELECT * FROM DormInfo
            ";
            DataTable tb = SqlHelper.QueryTable(CommandType.Text, StrSql);

            return tb;
        }
后面还有 35 行代码,解锁后查看完整代码

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

AI 解读

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

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