private void CarregaCor(int CdCor)
        {
            CorBLL  bll  = new CorBLL();
            CorInfo info = bll.Get(CdCor);

            txtDsCor.Text = info.DsCor;
        }
Exemple #2
0
        private void ExcluirCor()
        {
            CorBLL bll = new CorBLL();

            bll.Delete(Convert.ToInt32(grvListaCores.CurrentRow.Cells[1].Value));
            CarregaListaCores();
        }
        private void CadastraNovaCor()
        {
            CorBLL  bll  = new CorBLL();
            CorInfo info = new CorInfo();

            info.DsCor = txtDsCor.Text;
            bll.Inserir(info);
            LimparCampos();
        }
        private void CarregaCores(int pCdCor = 0)
        {
            CorBLL bll = new CorBLL();

            cbCdCor.DataSource    = bll.Listar();
            cbCdCor.DisplayMember = "DsCor";
            cbCdCor.ValueMember   = "CdCor";
            cbCdCor.SelectedValue = pCdCor as object;
        }
        private void AtualizarCor()
        {
            CorBLL  bll  = new CorBLL();
            CorInfo info = new CorInfo();

            info.CdCor = _CdCor;
            info.DsCor = txtDsCor.Text;

            bll.Update(info);
            AtualizaGridCor();
            this.Close();
        }
Exemple #6
0
        public void CarregaListaCores()
        {
            CorBLL bll = new CorBLL();

            grvListaCores.DataSource = bll.Listar();
        }