Beispiel #1
0
 private void cbACp4_MouseDoubleClick(object sender, MouseEventArgs e)
 {
     if (!(sender is ComboBox))
     {
         return;
     }
     MyMainForm.ShowFormAcp4Dialog(
         value =>
     {
         if (value != null)
         {
             (sender as ComboBox).Text = value;
         }
     });
 }
Beispiel #2
0
        private void dgvBal0GetCellValue(object sender, int colind)
        {
            Action <string> act =
                value =>
            {
                try
                {
                    if (value != null && dgvBal0.CurrentCell != null)
                    {
                        dgvBal0.CurrentCell.Value = value;
                        dgvBal0.RefreshEdit();
                        dgvBal0.EndEdit();
                        dgvBal0.Focus();
                    }
                    dgvBal0.GoingToDialog = false;
                    dgvBal0.Select();
                    if (dgvBal0.EditingControl != null)
                    {
                        ActiveControl = dgvBal0.EditingControl;
                    }
                }
                finally
                {
                    dgvBal0.GoingToDialog = false;
                }
            };

            if (colind == dgcBal0AC11.Index)
            {
                dgvBal0.GoingToDialog = true;
                MyMainForm.ShowFormAcplanDialog(act);
                return;
            }

            if (colind == dgcBal0AC24.Index)
            {
                dgvBal0.GoingToDialog = true;
                MyMainForm.ShowFormAcp4Dialog(act);
                return;
            }

            if (colind == dgcBal0Clid.Index)
            {
                dgvBal0.GoingToDialog = true;
                MyMainForm.ShowFormAcp5Dialog(act);
                return;
            }
        }
Beispiel #3
0
        private bool DoOnF5(ComboBox sender)
        {
            Action <string> act =
                value =>
            {
                if (value != null)
                {
                    sender.Text = value;
                }
            };

            if (sender == cbClid)
            {
                MyMainForm.ShowFormPersonsDialog(act);
                return(true);
            }

            if (sender == cbAC11 || sender == cbAC12 ||
                sender == cbAC21 || sender == cbAC22)
            {
                MyMainForm.ShowFormAcplanDialog(act);
                return(true);
            }

            if (sender == cbAC13 || sender == cbAC23)
            {
                MyMainForm.ShowFormAcp3Dialog(act);
                return(true);
            }

            if (sender == cbAC14 || sender == cbAC24)
            {
                MyMainForm.ShowFormAcp4Dialog(act);
                return(true);
            }

            if (sender == cbAC15 || sender == cbAC25)
            {
                MyMainForm.ShowFormAcp5Dialog(act);
                return(true);
            }

            return(false);
        }