Exemplo n.º 1
0
        public async void LoadCost(int id)
        {

            string requestUrl = "http://10.6.0.133/api/Test?id=" + id;
            ServiceHandler serviceHandler = new ServiceHandler();
            string result = await serviceHandler.RequestData(requestUrl);
            //DimensionModel dimensionModel = (DimensionModel)JsonConvert.DeserializeObject(result, typeof(DimensionModel));
            DimensionModel dimensionModel = new DimensionModel()
            {
                Density = 100,
                Length = 123,
                Weight = 12,
                Width = 33,
                Thickness = 3
            };

            this.Density = dimensionModel.Density;
            this.Length = dimensionModel.Length;
            this.Weight = dimensionModel.Weight;
            this.Width = dimensionModel.Width;
            this.Thickness = dimensionModel.Thickness;

        }
Exemplo n.º 2
0
 public async void SaveDimensions()
 {
     DimensionModel dimensionModel = new DimensionModel()
     {
         Density = this.Density,
         Length = this.Length,
         Weight = this.Weight,
         Width = this.Width,
         Thickness = this.Thickness
     };
     string requestUrl = "http://10.6.0.133/api/Test";
     ServiceHandler serviceHandler = new ServiceHandler();
     string jsonContent = JsonConvert.SerializeObject(dimensionModel);
     string result = await serviceHandler.PostRequest(requestUrl, jsonContent);
     //BaseResponse addGroupResponse = (BaseResponse)JsonConvert.DeserializeObject(result, typeof(BaseResponse));
    
 }