CommonBussiness/App_Data/Page_ZH.cs

(开头部分) 9KB

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

using System;
using System.Collections.Generic;
using System.Text;
using System.Web;
using System.Data;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
using DAL;

namespace CommonBussiness
{
    public class Page_ZH
    {
        public Page_ZH()
        { }

        public void InitBindData2(Control c, Wuqi.Webdiyer.AspNetPager aspnet, string tbname, string tbcolumn, string sqlwhere)
        {
            aspnet.RecordCount = GetRows(tbname, sqlwhere);
            if (aspnet.RecordCount > 0)
            {
                string contype = c.GetType().ToString();

                DataSet ds = GetList2(aspnet.PageSize, aspnet.CurrentPageIndex, sqlwhere, tbname, tbcolumn);
                if (ds.Tables[0].Rows.Count > 0)
                {
                    if (contype.IndexOf("GridView") != -1)
                    {
                        GridView gv = (GridView)c;
                        gv.DataSource = ds;
                        gv.DataBind();
                    }
                    else if (contype.IndexOf("Repeater") != -1)
                    {
                        Repeater rep = (Repeater)c;
                        rep.DataSource = ds;
                        rep.DataBind();
                    }
                    else if (contype.IndexOf("DataList") != -1)
                    {
                        DataList dl = (DataList)c;
                        dl.DataSource = ds;
                        dl.DataBind();
                    }
                }

                c.Visible = true;
            }
            else
            {
                string contype = c.GetType().ToString();
                if (contype.IndexOf("GridView") != -1)
                {
                    GridView gv = (GridView)c;
                    gv.DataSource = null;
                    gv.DataBind();
                }
                else if (contype.IndexOf("Repeater") != -1)
                {
后面还有 207 行代码,解锁后查看完整代码

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

AI 解读 AI

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

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