Esempio n. 1
0
        private void codigodeptoButtonEdit_Validated(object sender, EventArgs e)
        {
            DepartamentoDTO depto = new DepartamentoDTO();

            if (codigodeptoButtonEdit.Text.Trim() != "0" && this.Enabled == true)
            {
                try
                {
                    depto = LocalizarDepto();
                }
                catch
                {
                    depto.Codigo = Convert.ToInt32(codigodeptoButtonEdit.Text);

                    Cursor = Cursors.WaitCursor;
                    frmGridDepartamento frmgriddepartamento = new frmGridDepartamento(this, new MechTech.Util.Global.SystemDelegate(SetDepartamento));
                    frmgriddepartamento.ShowDialog();
                    Cursor = Cursors.Default;
                }
            }
            else
            {
                lblDepto.Text = "[]";
            }
            funcsalarioDTO.Departamento = depto;
        }
Esempio n. 2
0
        private void codigodeptoButtonEdit_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
        {
            Cursor = Cursors.WaitCursor;
            frmGridDepartamento frmGrid = new frmGridDepartamento(this, new MechTech.Util.Global.SystemDelegate(SetDepartamento));

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