Ejemplo n.º 1
0
        public ActionResult Delete(List <IdList> IdList)
        {
            if (IdList != null && IdList.Count > 0)
            {
                foreach (IdList value in IdList)
                {
                    if (value.Type.Equals("Folder"))
                    {
                        if (FolderBLL.DeleteById(value.Id) == false)
                        {
                            ResponseHelper.WriteFalse(Response);
                            return(null);
                        }
                    }
                    else
                    {
                        if (FileBLL.DeleteById(value.Id) == false)
                        {
                            ResponseHelper.WriteFalse(Response);
                            return(null);
                        }
                    }
                }
                ResponseHelper.WriteTrue(Response);
            }

            return(null);
        }
Ejemplo n.º 2
0
 public ActionResult Delete()
 {
     if (Request["Id"] != null && Request["id"] != "")
     {
         int id = Convert.ToInt32(Request["Id"]);
         if (FileBLL.DeleteById(id))
         {
             ResponseHelper.WriteTrue(Response);
         }
     }
     ResponseHelper.WriteFalse(Response);
     return(null);
 }
Ejemplo n.º 3
0
        public ActionResult Delete(string id)
        {
            FileBLL fb = new FileBLL();

            return(Json(fb.DeleteById(id, UserId, UserName).toJson()));
        }