Dal/DWebConfig.cs

(开头部分) 8KB

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

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

namespace Dal
{
   public  class DWebConfig
    {
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public MWebConfig GetTopModel()
        {

            StringBuilder strSql = new StringBuilder();
            strSql.Append("select  top 1 ID,webname,weburl,copyright,address,icp,phone,phone2,mobile,mobile2,qq,line,fax,postcode,email,title,keywords,description,details from WebConfig ");
            //strSql.Append(" where ID=@ID ");
            //SqlParameter[] parameters = {
            //        new SqlParameter("@ID", SqlDbType.Int,4)};
            //parameters[0].Value = ID;

            MWebConfig model = null;
            SqlDataReader sdr = OLEDBHelper.ExeReader(strSql.ToString(),null,CommandType.Text);
            if (sdr.Read())
            {
                
                model = new MWebConfig();
                model.ID = int.Parse(sdr["ID"].ToString());
                model.mobile2 = sdr["mobile2"].ToString();
                model.qq = sdr["qq"].ToString();
                model.line = sdr["line"].ToString();
                model.fax = sdr["fax"].ToString();
                model.postcode = sdr["postcode"].ToString();
                model.email = sdr["email"].ToString();
                model.title = sdr["title"].ToString();
                model.keywords = sdr["keywords"].ToString();
                model.description = sdr["description"].ToString();
                model.details = sdr["details"].ToString();
                model.webname = sdr["webname"].ToString();
                model.weburl = sdr["weburl"].ToString();
                model.copyright = sdr["copyright"].ToString();
                model.address = sdr["address"].ToString();
                model.icp = sdr["icp"].ToString();
                model.phone = sdr["phone"].ToString();
                model.phone2 = sdr["phone2"].ToString();
                model.mobile = sdr["mobile"].ToString();
																										
				
            }
            sdr.Close();
            sdr.Dispose();
            return model;
            
        }

        /// <summary>
后面还有 135 行代码,解锁后查看完整代码

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

AI 解读

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

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