/// <summary> /// 页面数据绑定 /// </summary> public void PageBind() { Tunnel.Model.Tunnel_InfoXJB model = new Tunnel.Model.Tunnel_InfoXJB(); model = tbll.GetModel(Id); title = model.Title; content = model.Content; setDate = model.SetDate.ToString("yyyy-MM-dd"); htmlSource = model.HtmlSource; userId = model.UserId; if (!string.IsNullOrEmpty(model.Files)) { fujian = "<a href='../" + model.Files + "' style='color: blue' >点击下载附件</a>"; } }
/// <summary> /// 删除记录 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void LinkButton1_Command(object sender, CommandEventArgs e) { int Id = Convert.ToInt32(e.CommandName); int relt = -1; cuttentPage = MTCPager1.PageIndex; Tunnel_InfoXJB model = mbll.GetModel(Id); //DelPricAndRider(Id); relt = mbll.Delete(Id); if (relt == 0) { Tunnel.Common.Message.Show("删除成功"); string strsql = ""; strsql = "insert into tunnel_log(l_user,l_time,l_content,l_ip,l_sort) values(" + ul.LoginID + ",'" + DateTime.Now + "','公司事务>>项经部信息>>删除项经部信息。标题:" + model.Title + "','" + Tunnel.Common.Common.GetIp() + "',2)"; Tunnel.Data.DbHelperSQL.ExecuteSql(strsql); } else { Tunnel.Common.Message.Show("删除失败"); } PageBind2(); }
public string iffile(object o) { Tunnel.BLL.Tunnel_InfoXJB ti = new Tunnel.BLL.Tunnel_InfoXJB(); Tunnel.Model.Tunnel_InfoXJB tii = new Tunnel_InfoXJB(); tii = ti.GetModel(Convert.ToInt32(o.ToString())); if (!string.IsNullOrEmpty(tii.Files)) { return("<font color=red>有</font>"); } else { return("无"); } }
private void PageBind(int indexId) { Tunnel.Model.Tunnel_InfoXJB model = new Tunnel.Model.Tunnel_InfoXJB(); Tunnel.BLL.Tunnel_InfoXJB index = new Tunnel.BLL.Tunnel_InfoXJB(); model = index.GetModel(indexId); tb_Title.Text = model.Title; DropDownList1.SelectedValue = model.TypeId.ToString(); Binddroplist(model.TypeId); DropDownList2.SelectedValue = model.Sectype.ToString(); FCKeditor.Value = model.Content; if (!model.Files.Equals("")) { Label3.Visible = false; Label2.Visible = true; Label4.Visible = true; Label2.Text = "<br/>附件名:" + model.Files.Substring(model.Files.LastIndexOf("\\") + 1); Label3.Text = model.Files; } else { Label3.Visible = false; Label2.Visible = false; Label4.Visible = false; } }
public string iffile(object o) { Tunnel.BLL.Tunnel_InfoXJB ti = new Tunnel.BLL.Tunnel_InfoXJB(); Tunnel.Model.Tunnel_InfoXJB tii = new Tunnel_InfoXJB(); tii = ti.GetModel(Convert.ToInt32(o.ToString())); if (!string.IsNullOrEmpty(tii.Files)) { return("<font color=red>有</font>"); } else { return("无"); } //string filelist = tii.Files; //int i = 0; //string filecontent = ""; //if (filelist != "") //{ // string[] filearr = filelist.Split(','); // foreach (string file in filearr) // { // if (file != "") // { // i++; // filecontent += Tunnel.Common.GetValue.getfu(file, "", i); // } // } // return filecontent; //} //else //{ // return " "; //} }