Exemplo n.º 1
0
        public bool Delete(ApiCall call)
        {
            Guid SiteId = call.GetGuidValue("SiteId");

            if (SiteId == default(Guid) && call.ObjectId != default(Guid))
            {
                SiteId = call.ObjectId;
            }

            if (SiteId != default(Guid))
            {
                WebSiteService.Delete(SiteId, call.Context.User);
                return(true);
            }
            return(false);
        }
Exemplo n.º 2
0
        public virtual bool Deletes(ApiCall call)
        {
            string json = call.GetValue("ids");
            if (string.IsNullOrEmpty(json))
            {
                json = call.Context.Request.Body;
            }

            List<Guid> ids = Lib.Helper.JsonHelper.Deserialize<List<Guid>>(json);

            if (ids != null && ids.Count() > 0)
            {
                foreach (var item in ids)
                {
                    WebSiteService.Delete(item, call.Context.User);
                }
                return true;
            }
            return false;
        }