protected void GVdisk_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowIndex > -1) { string snum = e.Row.Cells[0].Text; DataList dl = (DataList)e.Row.Cells[2].FindControl("DLfile"); LearnSite.BLL.ShareDisk kbll = new LearnSite.BLL.ShareDisk(); dl.DataSource = kbll.GetSnumList(snum); dl.DataBind(); e.Row.Cells[3].Text = dl.Items.Count.ToString(); } }
protected void Dlfilelist_ItemCommand(object source, DataListCommandEventArgs e) { if (e.CommandName == "D") { LearnSite.BLL.Students sbll = new LearnSite.BLL.Students(); string furl = e.CommandArgument.ToString(); LearnSite.Common.ShareDisk.DelFile(furl); //删除 LearnSite.BLL.ShareDisk kbll = new LearnSite.BLL.ShareDisk(); kbll.Deletefile(cook.Snum, furl); //删除数据库记录 System.Threading.Thread.Sleep(300); ListSelectShare(); } }
protected void Dlfilelist_ItemCommand(object source, DataListCommandEventArgs e) { if (e.CommandName == "D") { int Sid = Int32.Parse(Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["Sid"].ToString()); string Sname = Server.UrlDecode(Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["Sname"].ToString()); string Snum = Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["Snum"].ToString(); LearnSite.BLL.Students sbll = new LearnSite.BLL.Students(); string furl = e.CommandArgument.ToString(); LearnSite.Common.ShareDisk.DelFile(furl); //删除 LearnSite.BLL.ShareDisk kbll = new LearnSite.BLL.ShareDisk(); kbll.Deletefile(Snum, furl); //删除数据库记录 System.Threading.Thread.Sleep(300); ListSelectShare(); } }