Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static int getId(string m) {
- List<Moeda> contasBancarias;
- Dictionary<string, Moeda[]> docs;
- docs = Api.getDataFromWebAPI_EX<Moeda[]>(Api.EnderecoWebAPI + "/rest/api/v1/moedas", new Moeda[] { });
- /// Auth a = Api.postDataToWebAPI<Auth>(Api.EnderecoWebAPI + "/rest/login", new Login { Username = username, Password = password }, new Auth { });
- // MessageBox.Show(Api.Token + " - " + Api.TokenType);
- DataTable dt = new DataTable();
- dt.Columns.Add("Codigo");
- dt.Columns.Add("Descricao");
- if (docs.Count > 0)
- {
- contasBancarias = docs["moedas"].ToList();
- foreach (Moeda conta in contasBancarias)
- {
- if (conta.codigo.ToUpper().Equals(m))
- return conta.ID;
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement