Пример #1
0
    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);
                    }
                });
            }
        }));
    }
Пример #2
0
    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));
        }));
    }
Пример #3
0
    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);
        }));
    }