|
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/6b11be23/e503b68d/ |
?#pragma checksum "D:\wwwroot\keman\wwwroot\Back\info\lmgl.aspx.cs" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "A0C74BCF3BE896A35AEA83C9FEAE00B7"
#line 1 "D:\wwwroot\keman\wwwroot\Back\info\lmgl.aspx.cs"
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.IO;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Data.Sql;using System.Data.SqlClient;
using CoreClass;
using System.Data.SqlClient;
public partial class Back_Info_lmgl : System.Web.UI.Page
{
#region 域界说
CoreClass.DBCommon dbc = new DBCommon();
CoreClass.PublicFunction pubfun = new PublicFunction();
Zhongbiao bs = new Zhongbiao();
public int adminid;
public int channelid;
public string col = "info";
#endregion
DataSet dt_xgs = new DataSet();
public int pageidexx=0;
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
if (Request["pageidexxid"] != null && Request["pageidexxid"].ToString() != "")
{
pageidexx = Convert.ToInt32(Request["pageidexxid"].ToString());
}
if (Request["xg_id"] != null && Request["xg_id"].ToString()!="")
{
//Response.Write(Request["xg_id"].ToString() );
dt_xgs = bs.chaxun("select top 1 * from ClassChannel where ChannelId=" + Request["xg_id"]);
if (dt_xgs.Tables[0].Rows.Count>0)
{
TextBox4.Text = dt_xgs.Tables[0].Rows[0]["title"].ToString();
TextBox5.Text = dt_xgs.Tables[0].Rows[0]["paixuxh"].ToString();
DropDownList1.SelectedValue = dt_xgs.Tables[0].Rows[0]["int1"].ToString();
TextBox6.Text = dt_xgs.Tables[0].Rows[0]["MaxLevel"].ToString();
}
}
dlBind();
}
}
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
//if (e.Row.RowType == DataControlRowType.DataRow)
//{
// ((LinkButton)(e.Row.Cells[4].Controls[0])).Attributes.Add("onclick", "return confirm('确定要删除吗?')");
//}
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Attributes.Add("onmouseover", "this.style.backgroundColor='LightSkyBlue'");//鼠标移入显示的色彩
e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor='FFFFFF'");//鼠标移出显示的色彩
e.Row.Cells[2].ToolTip = e.Row.Cells[2].Text.ToString();
if (e.Row.Cells[2].Text.Length > 40)
{
e.Row.Cells[2].Text = e.Row.Cells[2].Text.Substring(0, 40) + "...";
}
}
GridView1.PageIndex = pageidexx;
}
protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e)
{
//int id = int.Parse(GridView1.DataKeys[e.RowIndex].Value.ToString());//删除数据字段;
//bs.user("delete from ClassChannel where ChannelId=" + id);
//dlBind();
}
public void dlBind()
{
string stress=TextBox1.Text.Trim().Replace("'","").ToString();
if (stress != "")
{
bs.bind("select * from ClassChannel where Title like '%" + stress + "%' order by paixuxh asc", GridView1);
}
else
{
bs.bind("select * from ClassChannel order by paixuxh asc", GridView1);
}
GridView1.PageIndex = pageidexx;
}
protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
//Label1.Text = e.NewPageIndex.ToString();
//if (Label1.Text!="")
//{
// GridView1.PageIndex = Convert.ToInt32(Label1.Text.ToString());
//}
pageidexx = e.NewPageIndex;
GridView1.PageIndex = pageidexx;
dlBind();
}
protected void Button1_Click(object sender, EventArgs e)
{
dlBind();
}
//批改
protected void GridView1_RowUpdating(object sender, GridViewUpdateEventArgs e)
{
//int id = int.Parse(GridView1.DataKeys[e.RowIndex].Value.ToString());//删除数据字段;
//Response.Write(id.ToString());
//bs.user("delete from ClassChannel where ChannelId=" + id);
//dlBind();
}
protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e)
{
}
//批改
protected void Button3_Click(object sender, EventArgs e)
{
//dt_xgs = bs.chaxun("select top 1 * from ClassChannel where ChannelId=" + Request["xg_id"]);
//if (dt_xgs.Tables[0].Rows.Count > 0)
//{
// TextBox4.Text = dt_xgs.Tables[0].Rows[0]["title"].ToString();
// TextBox5.Text = dt_xgs.Tables[0].Rows[0]["paixuxh"].ToString();
//}
if (!pubfun.IsNumeric(this.TextBox5.Text))
{
pubfun.Alert("排序编号只能是数字!", -1);
TextBox5.Focus();
return;
}
else
{
string daname = TextBox4.Text.Replace("'", "");
string danamexgl = TextBox4.Text.Replace("'", "")+"治理";
string danamexfl = TextBox4.Text.Replace("'", "")+"分类";
string dapaixu = TextBox5.Text.Replace("'", "");
if (Request["xg_id"] != null && Request["xg_id"].ToString() != "" && daname != "" && dapaixu != "")
{
//获取大栏目名称--原来的(批改前)
DataSet dt_dl_name = new DataSet();
string daname_zhiqian = "之前name";
string daname_zhiqiangl = "之前name治理";
string daname_zhiqianfl = "之前name分类";
dt_dl_name = bs.chaxun("select top 1 * from ClassChannel where ChannelId=" + Request["xg_id"]);
if (dt_dl_name.Tables[0].Rows.Count > 0)
{
daname_zhiqian = dt_dl_name.Tables[0].Rows[0]["title"].ToString();
daname_zhiqiangl = daname_zhiqian + "治理";
daname_zhiqianfl = daname_zhiqian + "分类";
}
//78888批改大栏目---分类 暗藏/显示 --挨次1
if (DropDownList1.SelectedValue.ToString() != "" && DropDownList1.SelectedValue.ToString() == "1")
{
bs.user("update MenuItems set PKey='Web22' where MenuTitle='" + daname_zhiqian + "'");
}
if (DropDownList1.SelectedValue.ToString() != "" && DropDownList1.SelectedValue.ToString() == "0")
{
bs.user("update MenuItems set PKey='Web' where MenuTitle='" + daname_zhiqian + "'");
}
//7777批改大栏目---分类 名称 --挨次2
bs.user("update MenuItems set MenuTitle='" + daname + "' where MenuTitle='" + daname_zhiqian + "'");
bs.user("update MenuItems set MenuTitle='" + danamexgl + "' where MenuTitle='" + daname_zhiqiangl + "'");
bs.user("update MenuItems set MenuTitle='" + danamexfl + "' where MenuTitle='" + daname_zhiqianfl + "'");
//批改大栏目 名称 排序 --挨次3
bs.user("update ClassChannel set int1=" + DropDownList1.SelectedValue + ",title='" + daname + "',paixuxh='" + dapaixu + "',MaxLevel='" + Convert.ToInt32(TextBox6.Text.ToString()) + "' where ChannelId=" + Request["xg_id"]);
bs.user("update MenuItems set OrderNum=" + dapaixu + " where MenuTitle='" + daname + "'");
}
pubfun.Alert(Page, "批改成功!");
}
dlBind();
//GridView1.Rows[4].BackColor = System.Drawing.Color.Red;
//DataSet dt_xg22s = bs.chaxun("select * from ClassChannel where paixuxh>" + Request["xg_idpx"] + "");
//if (dt_xg22s.Tables[0].Rows.Count > 0)
//{
//Response.Write(dt_xg22s.Tables[0].Rows.Count.ToString());
//GridView1.Rows[3].BackColor = System.Drawing.Color.Red;
//}
}
//显示、暗藏
public string b_xs(string id)
{
if (id == "0")
{
return "<span style='color:LightSkyBlue;'>正常显示</span>";
}
else
{
return "<span style='color:red;'>已暗藏</span>";
}
}
//排序
DataSet dt_pxid = new DataSet();
public string titl_px(string id)
{
string iddd = "0";
dt_pxid = bs.chaxun("select top 1 OrderNum from MenuItems where MenuTitle='" + id + "' ");
if (dt_pxid.Tables[0].Rows.Count>0)
{
iddd = dt_pxid.Tables[0].Rows[0]["OrderNum"].ToString();
}
return iddd;
}
public string b_sfxg(string id)
{
if (Request["xg_id"] != null && Request["xg_id"].ToString() != "" && Request["xg_id"].ToString() == id)
{
return "<span style='color:red;'>在批改中...</span>";
}
else
{
return "选择";
}
}
//增长大栏目
protected void Button2_Click(object sender, EventArgs e)
{
int ChannelIdd = 0; //大栏目 ID
string danametj = TextBox2.Text.Replace("'", ""); //大栏目名称
//增长大栏目
if (!pubfun.IsNumeric(this.TextBox3.Text))
{
pubfun.Alert("排序编号只能是数字!", -1);
TextBox3.Focus();
return;
}
else
{
if (danametj != "" && TextBox3.Text.Replace("'", "").ToString() != "")
{
int dapaixutj = Convert.ToInt32(TextBox3.Text.Replace("'", "").ToString());
DataSet dt_dalei = new DataSet();
dt_dalei = bs.chaxun("select top 1 ChannelId from ClassChannel where 1=1 order by ChannelId desc");
if (dt_dalei.Tables[0].Rows.Count > 0)
{
ChannelIdd = Convert.ToInt32(dt_dalei.Tables[0].Rows[0]["ChannelId"].ToString()) + 1;
}
DataSet dt_daleinamacf = new DataSet();
dt_daleinamacf = bs.chaxun("select ChannelId from ClassChannel where Title='" + danametj + "' ");
if (dt_daleinamacf.Tables[0].Rows.Count > 0)
{
pubfun.Alert(Page, "大栏目名称沉复!");
}
else
{
////增长大栏
bs.user("Insert Into ClassChannel(ChannelId,MaxLevel,Title,reg_pattern,int1,int2,int3,fenlei,mingcheng,lianjie,beiyong,tupian,kuan,gao,shiping,zhaiyao,xiangxi,tuijian,redian,dianji,paixu,ListOrPic,HaveRe,banner,titlepic,paixuxh) values(" + ChannelIdd + ",1,'" + danametj + "','',0,0,0,1,1,0,1,1,0,0,0,1,1,1,1,1,1,0,0,'',''," + dapaixutj + ") ");
//////增长大栏
//bs.user("Insert Into ClassChannel(ChannelId,MaxLevel,Title,memo,reg_pattern,int1,int2,int3,fenlei,mingcheng,lianjie,beiyong,tupian,kuan,gao,shiping,zhaiyao,xiangxi,tuijian,redian,dianji,paixu,ListOrPic,HaveRe,banner,titlepic,paixuxh) values(" + ChannelIdd + ",1,'" + danametj + "','','',0,0,0,1,1,0,1,1,0,0,0,1,1,1,1,1,1,0,0,'',''," + dapaixutj + ") ");
string MenuUrlssgl = "info/info.aspx?channelid=" + ChannelIdd;
string MenuUrlssfl = "class/class.aspx?channelid=" + ChannelIdd;
string danametjgl = danametj + "治理";
string danametjfl = danametj + "分类";
string MenuKeysjb = System.DateTime.Now.ToString().Replace("-", "").Replace(" ", "").Replace(":", "");
string MenuKeysjb1 = MenuKeysjb + "1";
string MenuKeysjb2 = MenuKeysjb + "2";
//增长大栏--栏目分类
bs.user("Insert Into MenuItems(MenuKey,PKey,MenuTitle,isTopFolder,isFolder,OrderNum,isMenu,isRights) values('" + MenuKeysjb + "','Web','" + danametj + "',0,1,1,1,1) ");
bs.user("Insert Into MenuItems(MenuKey,PKey,MenuTitle,isTopFolder,isFolder,OrderNum,MenuUrl,isMenu,isRights) values('" + MenuKeysjb1 + "','" + MenuKeysjb + "','" + danametjgl + "',0,1,2,'" + MenuUrlssgl + "',1,1) ");
bs.user("Insert Into MenuItems(MenuKey,PKey,MenuTitle,isTopFolder,isFolder,OrderNum,MenuUrl,isMenu,isRights) values('" + MenuKeysjb2 + "','" + MenuKeysjb + "','" + danametjfl + "',0,1,3,'" + MenuUrlssfl + "',1,1) ");
pubfun.Alert(Page, "增长成功!");
}
}
}
//加载
dlBind();
}
protected void Button4_Click(object sender, EventArgs e)
{
bs.user("update ClassChannel a,MenuItems b set a.paixuxh=b.OrderNum where a.Title=b.MenuTitle");
}
}
#line default
#line hidden