public void ListarEstabelecimento() { StartCoroutine(EstabelecimentoAPI.ListarEstabelecimento(null, (response, error) => { if (error != null) { Debug.Log(error); AlertaManager.Instance.ChamarAlertaMensagem(error, false); ObjLoaderLista.SetActive(false); return; } ObjLoaderLista.SetActive(false); foreach (Estabelecimento estabelecimento in response) { EstabelecimentoObj objEstab = Instantiate(EstabelecimentoRef, ScvEstabelecimentos); objEstab.PreencherInfo(estabelecimento, Cliente.ClienteLogado.RetornoGoldEstabelecimento(estabelecimento._id)); Main.Instance.ObterIcones(estabelecimento.icon, FileManager.Directories.estabelecimento, (textura) => { if (textura != null) { objEstab.PreencherIcone(textura); } }); } })); }
private void obterEstabelecimento(int aba) { Dictionary <string, object> form = new Dictionary <string, object> { { "_idEstabelecimento", Cliente.ClienteLogado.configClienteAtual.estabelecimento } }; StartCoroutine(EstabelecimentoAPI.ObterEstabelecimento(form, (response, error) => { Main.Instance.MenuEstabelecimento.PreencherInfoEstabelecimento(response, aba); EasyAudioUtility.Instance.Play(EasyAudioUtility.Som.Error); //StartCoroutine(FindObjectOfType<Alerta>().ChamarAlerta(retornoAPI.msg, comunicadorAPI.PnlPrincipal)); })); }
private void obterEstabelecimento() { Dictionary <string, object> form = new Dictionary <string, object> { { "estabelecimentoId", Cliente.ClienteLogado.configClienteAtual.estabelecimento } }; StartCoroutine(EstabelecimentoAPI.ObterEstabelecimento(form, (response, error) => { if (error != null) { Debug.Log(error); AlertaManager.Instance.ChamarAlertaMensagem(error, false); return; } Main.Instance.MenuEstabelecimento.PreencherInfoEstabelecimento(response); })); }