コード例 #1
0
        protected Response ExecCmd()
        {
            Response resp;

            Listing target = Listing.GetListingByID(itemID);

            if (target == null)
            {
                resp = new Response(false, outputErrListingNotExist);
                return(resp);
            }

            if (target.Username != username)
            {
                resp = new Response(false, outputErrListingOwnerNotMatch);
                return(resp);
            }

            if (!Listing.DeleteListing(itemID))
            {
                resp = new Response(false, outputErrListingNotExist);
                return(resp);
            }

            resp = new Response(true, outputSuccess);
            return(resp);
        }