Beispiel #1
0
        //------------------------------------------------------------------------------------------
        public virtual void DeleteSys( Microblog blog )
        {
            if (blog == null) throw new ArgumentNullException( "blog" );

            blog.SaveStatus = SaveStatus.SysDelete;
            blog.delete();
        }
Beispiel #2
0
        public override void After(object returnValue, MethodInfo method, object[] args, object target)
        {
            if (method.Name == "DeleteToTrash")
            {
                ForumTopic topic = args[0] as ForumTopic;
                Microblog  mblog = Microblog.find("DataId=:id and DataType=:dtype")
                                   .set("id", topic.Id)
                                   .set("dtype", typeof(ForumTopic).FullName)
                                   .first();

                if (mblog != null)
                {
                    mblog.delete();
                }
            }

            else if (method.Name == "DeleteList")
            {
                AdminValue av = args[0] as AdminValue;
                if (strUtil.HasText(av.Ids))
                {
                    String str = "DataType='" + typeof(ForumTopic).FullName + "' and DataId in (" + av.Ids + ")";
                    Microblog.deleteBatch(str);
                }
            }
        }
Beispiel #3
0
        //----------------------------------------------------------------------------

        public virtual void Delete(Microblog blog)
        {
            if (blog == null)
            {
                throw new ArgumentNullException("blog");
            }

            blog.SaveStatus = SaveStatus.Delete;
            blog.delete();
        }
Beispiel #4
0
 public virtual void DeleteTrue( Microblog blog )
 {
     blog.delete();
 }
 public virtual void Delete(Microblog blog)
 {
     blog.delete();
 }