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("无"); } }
protected void btnDel_Click(object sender, EventArgs e) { System.Web.UI.HtmlControls.HtmlInputCheckBox CBoxDelete; foreach (RepeaterItem rtitem in this.Repeater1.Items) { CBoxDelete = (System.Web.UI.HtmlControls.HtmlInputCheckBox)rtitem.FindControl("cb1"); if (CBoxDelete.Checked) { string id = ((HtmlInputHidden)rtitem.FindControl("SelectCode")).Value; Tunnel_InfoXJB model = m_InfoXJBBLL.GetModel(Convert.ToInt32(id)); //DelPricAndRider(Convert.ToInt32(model.Id)); m_InfoXJBBLL.Delete(Convert.ToInt32(model.Id)); string strsql = ""; strsql = "insert into tunnel_log(l_user,l_time,l_content,l_ip,l_sort) values(" + m_UserLogin.LoginID + ",'" + DateTime.Now + "','公司事务>>项经部信息>>删除项经部信息。标题:" + model.Title + "','" + Tunnel.Common.Common.GetIp() + "',2)"; Tunnel.Data.DbHelperSQL.ExecuteSql(strsql); } } PageBind(); }
/// <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("无"); } //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 " "; //} }