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

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

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

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