WELOA.DAL/Equipment/sb_stateDAO.cs

(完整代码) 1KB

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using WELOA.Model;
using LSDAL_SQL;
using System.Data.SqlClient;
using System.Data;
using System.Configuration;

namespace SBDAL_SQL
{
    public class sb_stateDAO
    {
        
        private DateSetInformation dsinfo = new DateSetInformation();
        private ls_exception exlog = new ls_exception();
        private Polytechnic trinfo = new Polytechnic();

        
        public DateSetInformation selectState()
        {
            using (SqlConnection connection = new SqlConnection(ConfigurationManager.ConnectionStrings["lsstring"].ConnectionString))
            {
                string selectCommandText = "select state from [sb_state]  Order by id";
                SqlDataAdapter adapter = new SqlDataAdapter(selectCommandText, connection);
                DataSet dataSet = new DataSet();
                try
                {
                    adapter.Fill(dataSet);
                    this.dsinfo.ds = dataSet;
                }
                catch (Exception exception)
                {
                    this.exlog.insexception("sb_stateDAO.cs selectState", exception.Message);
                    this.dsinfo.nException = 1;
                    return this.dsinfo;
                }
            }
            return this.dsinfo;
        }

    }
}

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

AI 解读

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

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