Example #1
0
        private void codigosecaoButtonEdit_Validated(object sender, EventArgs e)
        {
            if (!codigosecaoButtonEdit.IsModified)
            {
                return;
            }

            SecaoDTO secao = new SecaoDTO();

            if (codigosecaoButtonEdit.Text.Trim() != "0" && this.Enabled == true)
            {
                try
                {
                    secao = LocalizarSecao();
                }
                catch
                {
                    secao.Codigo = Convert.ToInt32(codigosecaoButtonEdit.Text);

                    Cursor = Cursors.WaitCursor;
                    frmGridSecao frmgridsecao = new frmGridSecao(this, new MechTech.Util.Global.SystemDelegate(SetSecao));
                    frmgridsecao.ShowDialog();
                    Cursor = Cursors.Default;
                }
            }
            else
            {
                lblSecao.Text = "[]";
            }
            funcsalarioDTO.Secao = secao;
        }
Example #2
0
        private void codigosecaoButtonEdit_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
        {
            Cursor = Cursors.WaitCursor;
            frmGridSecao frmGrid = new frmGridSecao(this, new MechTech.Util.Global.SystemDelegate(SetSecao));

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