Ejemplo n.º 1
0
 protected void gridViewFileDownload_RowDeleting(object sender, GridViewDeleteEventArgs e)
 {
     try
     {
         GridViewRow    row      = gridViewFileDownload.Rows[e.RowIndex];
         Int32          ID       = Convert.ToInt32(((Label)row.Cells[0].FindControl("lblID")).Text);
         OtherFunctions obj      = new OtherFunctions();
         String         FileName = obj.GetFileNameByID(ID);
         Globals.DeleteFile(FileName);
         obj.DeleteFileDownload(ID);
         LoadGridViewFileDownload();
     }
     catch { }
 }
Ejemplo n.º 2
0
 protected void btnDelete_Click(object sender, EventArgs e)
 {
     try
     {
         Int32          ID       = Globals.GetIntFromQueryString("ID");
         OtherFunctions obj      = new OtherFunctions();
         String         FileName = obj.GetFileNameByID(ID);
         Globals.DeleteFile(FileName, "CommonFiles");
         int kq = -1;
         kq = obj.DeleteFileDownload(ID);
         ShowMessage(kq, "xóa");
         LoadGridViewFileDownload();
     }
     catch { }
 }