private void PopularDgvCliente()
        {
            ServicoPLA servicoPLA = new ServicoPLA();
            var        retorno    = servicoPLA.ListarCliente();

            dgvCliente.DataSource = retorno.Item2;
        }
示例#2
0
        private void ListarCliente()
        {
            ServicoPLA servicoPLA = new ServicoPLA();
            var        retorno    = servicoPLA.ListarCliente();

            if (retorno.Item2.Rows.Count != 0)
            {
                int aux = 0;

                while (retorno.Item2.Rows.Count != aux)
                {
                    cbxCliente.Items.Add(retorno.Item2.Rows[aux]["Nome"].ToString());
                    aux++;
                }
            }
        }
示例#3
0
        private int GetReferencialClienteSelecionado(string nome)
        {
            ServicoPLA servicoPLA = new ServicoPLA();
            var        retorno    = servicoPLA.ListarCliente();
            int        referencialClienteSelecionado = 0;

            if (retorno.Item2.Rows.Count != 0)
            {
                int contador = 0;

                while (retorno.Item2.Rows.Count != contador)
                {
                    if (nome == retorno.Item2.Rows[contador]["Nome"].ToString())
                    {
                        string aux = retorno.Item2.Rows[contador]["Referencial"].ToString();
                        referencialClienteSelecionado = int.Parse(aux);

                        return(referencialClienteSelecionado);
                    }
                    contador++;
                }
            }
            return(0);
        }