Beispiel #1
0
        public byte[] HandleDemoteOwner(string json)
        {
            DemoteOwnerRequest   res = JsonConvert.DeserializeObject <DemoteOwnerRequest>(json);
            Tuple <bool, string> ans = appointService.RemoveStoreOwner(res.Appointer, res.Appointed, res.StoreId);
            string jsonAns           = Seralize(new DemoteOwnerResponse(ans.Item1, ans.Item2));

            return(security.Encrypt(jsonAns));
        }
        async public Task <Tuple <bool, string> > DemoteOwner(string appointer, string appointed, int storeId)
        {
            DemoteOwnerRequest request = new DemoteOwnerRequest(appointer, appointed, storeId);

            comm.SendRequest(request);
            DemoteOwnerResponse response = await comm.Get <DemoteOwnerResponse>();

            return(new Tuple <bool, string>(response.Success, response.Error));
        }