/// <summary> /// 删除记录 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void LinkButton1_Command(object sender, CommandEventArgs e) { string a = e.CommandName.ToString(); Tunnel.BLL.Tunnel_Profile pf = new Tunnel.BLL.Tunnel_Profile(); Tunnel.Model.Tunnel_Profile model = pf.GetModel(IsNum(a)); pf.Delete(IsNum(a)); string strsql = ""; strsql = "insert into tunnel_log(l_user,l_time,l_content,l_ip,l_sort) values(" + ul.LoginID + ",'" + DateTime.Now + "','公司事务>>档案管理>>删除档案信息。标题:" + model.p_name + "','" + Tunnel.Common.Common.GetIp() + "',2)"; Tunnel.Data.DbHelperSQL.ExecuteSql(strsql); Tunnel.Common.Message.Show("删除成功!"); }
protected void Page_Load(object sender, EventArgs e) { string a = "0"; if (!IsPostBack) { if (!string.IsNullOrEmpty(Request.QueryString["id"])) { a = Request.QueryString["id"].ToString(); } Tunnel.BLL.Tunnel_Profile pf = new Tunnel.BLL.Tunnel_Profile(); Tunnel.Model.Tunnel_Profile pff = new Tunnel.Model.Tunnel_Profile(); pff = pf.GetModel(IsNum(a)); if (pff != null) { Label1.Text = pff.p_name; Label2.Text = pff.p_year.ToString(); Label3.Text = pff.p_bum; Label4.Text = pff.p_filetype; } } }