Example #1
0
        private void setupcbFilial()
        {
            FilialBLL     filialBLL = new FilialBLL();
            List <Filial> lstFilial = filialBLL.getFilial();

            cbFilial.DataSource    = lstFilial;
            cbFilial.ValueMember   = "Id";
            cbFilial.DisplayMember = "nome_fantasia";
            cbFilial.SelectedIndex = -1;
            if (lstFilial.Count <= 0)
            {
                cbFilial.Enabled = false;
            }
        }
Example #2
0
 private void setupcbFilial()
 {
     if (stUsuario.UsuarioLogado.Id_filial == null)
     {
         FilialBLL     filialBLL = new FilialBLL();
         List <Filial> lstFilial = filialBLL.getFilial();
         cbFilial.DataSource    = lstFilial;
         cbFilial.ValueMember   = "Id";
         cbFilial.DisplayMember = "nome_fantasia";
         cbFilial.SelectedIndex = -1;
         if (lstFilial.Count <= 0)
         {
             cbFilial.Enabled = false;
             gbFilial.Visible = false;
         }
         else
         {
             cbFilial.Enabled = true;
             gbFilial.Visible = true;
         }
     }
 }