public byte[] HandleDemoteManager(string json) { DemoteManagerRequest res = JsonConvert.DeserializeObject <DemoteManagerRequest>(json); Tuple <bool, string> ans = appointService.RemoveStoreManager(res.Appointer, res.Appointed, res.StoreId); string jsonAns = Seralize(new DemoteManagerResponse(ans.Item1, ans.Item2)); return(security.Encrypt(jsonAns)); }
async public Task <Tuple <bool, string> > DemoteManager(string appointer, string appointed, int storeId) { DemoteManagerRequest request = new DemoteManagerRequest(appointer, appointed, storeId); comm.SendRequest(request); DemoteManagerResponse response = await comm.Get <DemoteManagerResponse>(); return(new Tuple <bool, string> (response.Success, response.Error)); }