Beispiel #1
0
		public async Task<ResultLogin<Vendors>> LoginVendors (string email, string pwd)
		{
		
			try {
				using (var Client = new  ApiClient ()) {


					var Result = await Client.GetAsync ("Vendors/LoginVendors?email=" + email + "&pwd=" + pwd);

					var ResultJson = Result.Content.ReadAsStringAsync ().Result;

					var dato = JsonConvert.DeserializeObject<ResultLogin<Vendors>> (ResultJson);

					return dato;

				}
			} catch (Exception) {

				return null;//LoginVendors( email, pwd);
			}

		
		
		}
Beispiel #2
0
		public async void SetConsultProduct (string id, string idp)
		{

			try {

				using (var Client = new  ApiClient ()) {

					await Client.GetAsync ("Clients/SetConsultProduct?id=" + id + "&idp=" + idp);

				}


			} catch (Exception) {

				return;
			}
		}
Beispiel #3
0
		public async Task<List<Products>> GetProductByIdCategorys (string id)
		{

			try {

				using (var Client = new  ApiClient ()) {


					var Result = await Client.GetAsync ("App/GetProductByIdCategorys?id=" + id);

					var ResultJson = Result.Content.ReadAsStringAsync ().Result;

					var dato = JsonConvert.DeserializeObject<List<Products>> (ResultJson);

					return dato;

				}


			} catch (Exception) {

				return null;
			}
		}
Beispiel #4
0
		public async void SetLikeProductById (string id)
		{

			try {

				using (var Client = new  ApiClient ()) {
					
					await Client.GetAsync ("App/SetLikeProductById?id=" + id);

				}


			} catch (Exception) {

				return;
			}
		}
Beispiel #5
0
		public async Task <Vendors>GetUser (string email)
		{

			try {
				using (var Client = new  ApiClient ()) {


					var Result = await Client.GetAsync ("User/GetUser?email=" + email);

					var ResultJson = Result.Content.ReadAsStringAsync ().Result;

					var dato = JsonConvert.DeserializeObject<Vendors> (ResultJson);

					return dato;

				}
			} catch (Exception) {

				return null;//await GetUser (email);
			}


		}