示例#1
0
        private async void UpdateStatus(ReuestProperty rp)
        {
            HttpClient httpClient = new HttpClient();

            Uri uri = new Uri("http://beam.gear.host/api/Request");

            string json     = JsonConvert.SerializeObject(rp, Formatting.Indented);
            var    content  = new StringContent(json, Encoding.UTF8, "application/json");
            var    response = await httpClient.PutAsync(uri, content);

            if (response.IsSuccessStatusCode)
            {
                string res = await response.Content.ReadAsStringAsync();

                //if (res == "0")
                //{
                //    return false;
                //}
                //else //success
                //{
                //    App.UserEmail = email;
                //    App.UserPK = Convert.ToInt32(res);
                //}
            }
            //// need to change //
        }
示例#2
0
        public InboxDetails(string PK, string UserPK, string reqType, string UserTo)
        {
            rp    = new ReuestProperty();
            rp.PK = Convert.ToInt32(PK);

            ReqPK      = PK;
            strReqType = reqType;
            InitializeComponent();
            GetRequestDocument(PK, UserTo, reqType);
            UPk  = UserPK; // from user or the one who is logged in
            ToID = UserTo;
        }