コード例 #1
0
        private void codigosetorButtonEdit_Validated(object sender, EventArgs e)
        {
            if (!codigosetorButtonEdit.IsModified)
            {
                return;
            }

            SetorDTO setor = new SetorDTO();

            if (codigosetorButtonEdit.Text.Trim() != "0" && this.Enabled == true)
            {
                try
                {
                    setor = LocalizarSetor();
                }
                catch
                {
                    setor.Codigo = Convert.ToInt32(codigosetorButtonEdit.Text);

                    Cursor = Cursors.WaitCursor;
                    frmGridSetor frmgridsetor = new frmGridSetor(this, new MechTech.Util.Global.SystemDelegate(SetSetor));
                    frmgridsetor.ShowDialog();
                    Cursor = Cursors.Default;
                }
            }
            else
            {
                lblSetor.Text = "[]";
            }
            funcsalarioDTO.Setor = setor;
        }
コード例 #2
0
        private void codigosetorButtonEdit_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
        {
            Cursor = Cursors.WaitCursor;
            frmGridSetor frmGrid = new frmGridSetor(this, new MechTech.Util.Global.SystemDelegate(SetSetor));

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