public/qiupeng.cs

(开头部分) 20KB

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

using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.OleDb;
using System.Collections;
namespace qiupeng.Public
{
    public class Db
    {
        public static string strConn = "";
        public static DataView Config;
        public static DataView Board;

        public string DbPath()
        {

            strConn = "" + System.Configuration.ConfigurationManager.AppSettings["connstr"].ToString() + ";Provider=SQLOLEDB";


            return strConn;
        }// 数据库连接字符串。

        public static string ConnectionString
        {
            get
            {
                Db ConnectionString = new Db();
                return ConnectionString.DbPath();
            }
        }// 数据库连接字符串属性。


        public void ToExcel(System.Web.UI.Control ctl, string FileName)
        {
            HttpContext.Current.Response.Charset = "UTF-8";
            HttpContext.Current.Response.ContentEncoding = System.Text.Encoding.Default;
            HttpContext.Current.Response.ContentType = "application/ms-excel";
            HttpContext.Current.Response.AppendHeader("Content-Disposition", "attachment;filename=" + "" + FileName + ".xls");
            ctl.Page.EnableViewState = false;
            System.IO.StringWriter tw = new System.IO.StringWriter();
            System.Web.UI.HtmlTextWriter hw = new System.Web.UI.HtmlTextWriter(tw);
            ctl.RenderControl(hw);
            HttpContext.Current.Response.Write(tw.ToString());
            HttpContext.Current.Response.End();
        }//导入excel


        public void QuanXianVis(System.Web.UI.Control ctl,string qxname,string qxstr)
        {
            if (!StrIFInStr(qxname, qxstr))
            {
                ctl.Visible = false;
            }
            else
后面还有 525 行代码,购买后查看完整代码

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

AI 解读 AI

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

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