|
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/712bd9e6/ca967f19/ |
?#pragma checksum "D:\wwwroot\bgsciences\wwwroot\sysmanage\files\fuwu\fuwutypechild.aspx.cs" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "9F5CA9CC15A0A049EB3884296BA1F0C60214DBE1"
#line 1 "D:\wwwroot\bgsciences\wwwroot\sysmanage\files\fuwu\fuwutypechild.aspx.cs"
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class sysmanage_files_fuwu_fuwutypechild : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
login.OnLine();
if (!IsPostBack)
{
//if (Session["UserName"] == null)
//{
// Page.Response.Write("<script language='javascript'> top.window.location = '../../login.aspx' </script>");
//}
if (Request.Form["Option"] != null && Request.Form["Option"] != "")
{
int id = Convert.ToInt32(Request.Form["id"]);
SQLServerHelper.execNonQuery("delete from TB_FuWuClass where id = " + id + "");
Response.Write("删除成功");
Response.End();
}
if (Session["flfid"] != null)
{
Bind("fid = " + Session["flfid"].ToString());
}
if (Request.QueryString["fid"] != null && Request.QueryString["fid"] != "")
{
Session["flfid"] = Request.QueryString["fid"];
Bind("fid = " + Request.QueryString["fid"]);
}
if (Request.QueryString["id"] != null && Request.QueryString["id"] != "")
{
this.txt_name.Text = SQLServerHelper.getOneVal("select sname from TB_FuWuClass where id = " + Request.QueryString["id"]);
bt_add.Text = "编纂分类";
}
}
}
//绑定步骤
private void Bind(string where)
{
this.InfoList.DataSource = SQLServerHelper.ExecuteTable("select * from TB_FuWuClass where " + where);
this.InfoList.DataBind();
}
protected void bt_add_Click(object sender, EventArgs e)
{
if (Request.QueryString["id"] != null && Request.QueryString["id"] != "")
{
if (this.txt_name.Text.Trim() != null && this.txt_name.Text.Trim() != "")
{
string strupsql = "update TB_FuWuClass set sname = '" + this.txt_name.Text.Trim() + "' where id = " + Request.QueryString["id"];
SQLServerHelper.execNonQuery(strupsql);
}
}
else
{
if (Session["flfid"] != null)
{
if (this.txt_name.Text.Trim() != null && this.txt_name.Text.Trim() != "")
{
SQLServerHelper.execNonQuery("insert into TB_FuWuClass (sname,fid) values ('" + this.txt_name.Text.Trim() + "'," + Session["flfid"].ToString() + ")");
}
}
}
if (Session["flfid"] != null)
{
Bind("fid = " + Session["flfid"].ToString());
}
this.txt_name.Text = "";
}
}
#line default
#line hidden