Esempio n. 1
0
        private void frmInventarioFiltrar_Load(object sender, EventArgs e)
        {
            try
            {
                DALConexao cx  = new DALConexao(DadosDaConexao.StringDaConexao);
                BLLGrupo   bll = new BLLGrupo(cx);

                DataTable tabelag = bll.LocalizarGrupo();


                // Preenche grupos
                for (int i = 0; i < tabelag.Rows.Count; i++)
                {
                    string IdGrupo   = tabelag.Rows[i]["id_grupo"].ToString();
                    string CodGrupo  = tabelag.Rows[i]["codigo_grupo"].ToString();
                    string NomeGrupo = tabelag.Rows[i]["nome_grupo"].ToString();


                    String[] P = new string[] { false.ToString(), CodGrupo, NomeGrupo, IdGrupo };
                    this.dataGridView1.Rows.Add(P);
                }
            }
            catch
            {
                MessageBox.Show("Sem grupos cadastrados.");
            }
        }
Esempio n. 2
0
        private void LimpaCampos()
        {
            txtNumeroInventario.Clear();

            DALConexao con  = new DALConexao(DadosDaConexao.StringDaConexao);
            BLLUsuario bllu = new BLLUsuario(con);

            DTOUsuario modelou = bllu.CarregaModeloUsuario(idUsuario);

            DALConexao cx    = new DALConexao(DadosDaConexao.StringDaConexao);
            BLLUnidade bllun = new BLLUnidade(cx);

            cbUnidade.DataSource    = bllun.Localizar("");
            cbUnidade.DisplayMember = "cod_unidade";
            cbUnidade.ValueMember   = "id_unidade";
            cbUnidade.Text          = modelou.IdUnidade.ToString("00");

            unidade = modelou.IdUnidade;

            cbTipoInv.Text = "Inventário";

            if (modelou.PermissaoUsuario < 4)
            {
                cbUnidade.Enabled = false;
            }

            if (modelou.PermissaoUsuario < 3)
            {
                cbTipoInv.Enabled = false;
            }


            BLLGrupo bllg = new BLLGrupo(cx);

            lbGrupo.DataSource    = bllg.LocalizarGrupo();
            lbGrupo.DisplayMember = "nome_grupo";

            DateTime Hoje = DateTime.Today;

            cbItensAContar.Text = "Somente Mix";

            txtDataInventario.Text = Hoje.ToString("d");
            txtDataMovimento.Text  = Hoje.ToString("d");
            lbGrupo.ClearSelected();

            dgvInventario.Rows.Clear();


            txtAberto.Clear();
            this.operacao = "Incluir";
        }
Esempio n. 3
0
        private void LimparTela()
        {
            this.liberado = false;

            DateTime Hoje = DateTime.Today;

            txtData.Text = Hoje.ToString("d");

            DALConexao con  = new DALConexao(DadosDaConexao.StringDaConexao);
            BLLUsuario bllu = new BLLUsuario(con);

            DTOUsuario modelou = bllu.CarregaModeloUsuario(idUsuario);

            BLLUnidade bllun = new BLLUnidade(con);

            cbUnidade.DataSource    = bllun.Localizar("");
            cbUnidade.DisplayMember = "cod_unidade";
            cbUnidade.ValueMember   = "id_unidade";
            lbNomeProduto.Text      = "";
            cbUnidade.Text          = modelou.IdUnidade.ToString("00");

            BLLGrupo bllg = new BLLGrupo(con);

            listGrupo.DataSource    = bllg.LocalizarGrupo();
            listGrupo.DisplayMember = "nome_grupo";
            listGrupo.ClearSelected();

            numQuant.Value = 1;
            txtCodProdAdd.Clear();


            //limpa

            this.initial = true;

            this.liberado = true;
        }