点击回首页
我的浏览记录 | | 帮助?
当前位置:

源码截图

源码目录树

当前路径:admin/secondhouselist.aspx.cs     using System;
using System.Text;
using System.Data;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DTcms.Common;
using DTcms.BLL;
using DTcms.Web.UI;
using System.Data.SqlClient;

namespace fcsite.admin
{
    public partial class secondhouselist : System.Web.UI.Page
    {
        protected int totalCount;
        protected int page;
        protected int pageSize;
        protected string property = string.Empty;
        protected string keywords = string.Empty;
        protected string prolistview = string.Empty;

        protected void Page_Load(object sender, EventArgs e)
        {
            this.keywords = DTRequest.GetQueryString("keywords");//关键字
            this.pageSize = GetPageSize(5); //每页数量
            this.prolistview = Utils.GetCookie("article_list_view"); //显示方式
            if (!Page.IsPostBack)
            {
                if (Request.Cookies["site"] != null)
                {
                    ViewState["adminid"] = Request.Cookies["site"]["adminid"].ToString();
                    totalItem();
                    RptBind();
                }
                else
                {
                    Response.Redirect("/admin/login.aspx");
                }

            }
        }
        #region 总的数据量=================================
        public void totalItem()
        {

            SqlConnection con = new SqlConnection(System.Configuration.ConfigurationManager.AppSettings["sqldb"].ToString());
            SqlCommand cmd = new SqlCommand();
            cmd.Connection = con;
            if (Convert.ToInt32(ViewState["adminid"]) == 0)
            {
                if (keywords == "")
                {
                    cmd.CommandText = "select count(*) from second_house";
                }
                else
                {
                    cmd.CommandText = "select count(*) from second_house where housename like @housename";
                    cmd.Parameters.Add("@housename", SqlDbType.NVarChar);
                    cmd.Parameters["@housename"].Value = "%" + this.keywords + "%";
                }
            }
            else
            {
                if (keywords == "")
                {
                    cmd.CommandText = "select count(*) from second_house where adminid=@adminid";
                    cmd.Parameters.Add("@adminid", SqlDbType.Int);...
对不起,完整源码文件,请先购买后再查看
关于我们 | 顾问团队 | 发展历程 | 联系我们 | 源码上传
联系电话(Tel):4008-010-151(免长途) 企业QQ:2852517674
地址:北京市海淀区中关村鼎好大厦A座二层 邮编:100080
Room A-801,Dinghao Building,Zhongguancun,Beijing,China,100080
51Aspx.com 版权所有 CopyRight © 2006-2015. 京ICP备09089570号 | 京公网安备11010702000869号
分享该页面
关闭侧边栏