Beispiel #1
0
        public ActionResult OrganizationList()
        {
            if (Session["username"] == null)
            {
                return(RedirectToAction("HomePage", "Home"));
            }

            int id = Convert.ToInt32(Request.QueryString["delete"]);

            if (id != 0)
            {
                Organization organization = organizationManager.GetById(id);
                organizationManager.Delete(organization);
                return(RedirectToAction("OrganizationList"));
            }

            return(View());
        }
        public async Task <IActionResult> Delete(string id)
        {
            await _manager.Delete(new Guid(id));

            return(Ok(id));
        }