Exemplo n.º 1
0
        private void codigocboButtonEdit_Validated(object sender, EventArgs e)
        {
            if (!codigocboButtonEdit.IsModified)
            {
                return;
            }

            CBODTO cbo = new CBODTO();

            if (codigocboButtonEdit.Text.Trim() != string.Empty && codigocboButtonEdit.Text.Trim() != "0" && this.Enabled == true)
            {
                try
                {
                    cbo = cboGL.GetCBOCodigo(codigocboButtonEdit.Text.Trim());
                    descricaocboTextEdit.Text = cbo.Descricao;
                }
                catch
                {
                    cbo.Codigo = codigocboButtonEdit.Text;
                    descricaocboTextEdit.Text = string.Empty;

                    Cursor = Cursors.WaitCursor;
                    frmGridCBO frmgridcbo = new frmGridCBO(this, new Global.SystemDelegate(SetCBO));
                    frmgridcbo.Show();
                    Cursor = Cursors.Default;
                }
            }
            else
            {
                descricaocboTextEdit.Text = string.Empty;
            }
            funcaoDTO.CBO = cbo;
        }
Exemplo n.º 2
0
        private void codigocboButtonEdit_Click(object sender, EventArgs e)
        {
            Cursor = Cursors.WaitCursor;
            frmGridCBO frmGrid = new frmGridCBO(this, new Global.SystemDelegate(SetCBO));

            frmGrid.Show();
            Cursor = Cursors.Default;
        }