示例#1
0
        private void gridMain_DoubleClick(object sender, EventArgs e)
        {
            int index = gridMain.GetSelectedIndex();

            if (index == -1)           //Clicked in empty space.
            {
                return;
            }
            //Mimics FormClaimsSend.gridHistory_CellDoubleClick(...)
            Cursor = Cursors.WaitCursor;
            Etrans et = (Etrans)gridMain.ListGridRows[index].Tag;

            //Sadly this is needed due to FormEtrans835Edit calling Etranss.Update .
            //See Etranss.RefreshHistory(...), this query does not select all etrans columns.
            //Mimics FormClaimsSend.gridHistory_CellDoubleClick(...)
            et = Etranss.GetEtrans(et.EtransNum);
            if (et == null)
            {
                Cursor = Cursors.Default;
                MsgBox.Show(this, "ERA could not be found, it was most likely deleted.");
                RefreshAndFillGrid();
                return;
            }
            EtransL.ViewFormForEra(et, this);
            Cursor = Cursors.Default;
        }
 private void gridEras_CellDoubleClick(object sender, UI.ODGridClickEventArgs e)
 {
     EtransL.ViewFormForEra(_listEtrans[gridEras.SelectedIndices[0]], this, _specificClaimNum);
 }