Esempio n. 1
0
        public JsonResult Delete(string id)
        {
            if (!AuthorizationProvider.IsPropertyEditor())
            {
                return(Json("denied", JsonRequestBehavior.AllowGet));
            }

            try
            {
                PropertyProvider dataProvider = new PropertyProvider(_dbContext);
                dataProvider.Delete(id);
                dataProvider.Commit();
                return(Json("success", JsonRequestBehavior.AllowGet));
            }
            catch
            {
                // TODO: logging
            }
            return(Json("fail", JsonRequestBehavior.AllowGet));
        }