Ejemplo n.º 1
0
        public static Transaction_Table GetTransactionByUserId(int id)
        {
            string url;

            url = "http://" + App.serviceurl + "/api/Transaction_Table/GetTransaction_TableByUser/" + id;

            Uri BaseUri = new Uri(url);

            using (var client = new HttpClient())
            {
                var response = "";

                try
                {
                    Task task = Task.Run(async() =>
                    {
                        response = await client.GetStringAsync(BaseUri);
                    });
                    task.Wait(30000);
                }
                catch (System.AggregateException)
                {
                    return(null);
                }

                Transaction_Table obj = JsonConvert.DeserializeObject <Transaction_Table>(response);
                return(obj);
            }
        }
Ejemplo n.º 2
0
 public Log_Table(Transaction_Table t)
 {
     User_Id      = t.User_Id;
     Volunteer_Id = t.Volunteer_Id;
     Driver_Id    = t.Driver_Id;
     Time_Begin   = t.Time_Begin;
     Time_Close   = t.Time_Close;
     Items        = t.Items;
     Vehicle      = t.Vehicle;
     Status       = t.Status;
     L_User       = t.L_User;
     L_Volunteer  = t.L_Volunteer;
     L_Driver     = t.L_Driver;
 }