public JsonResult deleteFolder(string folderid) { int folderid1 = int.Parse(folderid); @ViewBag.name = Session["username"]; FolderBAL fb = new FolderBAL(); FolderDTO fd = new FolderDTO(); if (fb.DeleteProduct(folderid1) > 0 && fb.Deletefile(folderid1) > 0 && fb.deletefolder(folderid1) > 0) { Url.Content("~/Home/NormalUser"); } return(Json(JsonRequestBehavior.AllowGet)); }
/* public ActionResult parfolder() * { * * @ViewBag.name = Session["username"]; * @ViewBag.userid = Session["userid"]; * var id = Session["parid"]; * int id1 = (int)id; * FolderBAL fb = new FolderBAL(); * FolderDTO fd = new FolderDTO(); * * var folders = fb.GetAllParFolders(id1); * * return View("file",folders); * * * }*/ public ActionResult deleteparFolder() { string id = Request.QueryString["folderid"]; int folderid1 = int.Parse(id); @ViewBag.name = Session["username"]; FolderBAL fb = new FolderBAL(); FolderDTO fd = new FolderDTO(); if (fb.DeleteProduct(folderid1) > 0) { return(Redirect("http://localhost:50362/Home/getcombine")); } return(View("file")); }