Beispiel #1
0
        private void gridMain_CellDoubleClick(object sender, ODGridClickEventArgs e)
        {
            DataRow         row             = (DataRow)gridMain.ListGridRows[e.Row].Tag;
            long            selectedLabCase = PIn.Long(row["LabCaseNum"].ToString());
            FormLabCaseEdit FormL           = new FormLabCaseEdit();

            FormL.CaseCur = LabCases.GetOne(selectedLabCase);
            FormL.ShowDialog();
            switch (FormL.DialogResult)
            {
            default:
            case DialogResult.Cancel:                    //==Jordan don't refresh unless we have to.  It messes up the user's ordering.
                return;

            case DialogResult.Abort:                    //User was forced out of window due to a null object, refresh grid to remove missing row.
                FillGrid();
                return;

            case DialogResult.OK:
                //Intentionally blank
                break;
            }
            FillGrid();
            for (int i = 0; i < table.Rows.Count; i++)
            {
                if (table.Rows[i]["LabCaseNum"].ToString() == selectedLabCase.ToString())
                {
                    gridMain.SetSelected(i, true);
                    break;
                }
            }
        }
Beispiel #2
0
        private void gridMain_CellDoubleClick(object sender, ODGridClickEventArgs e)
        {
            int             selectedLabCase = PIn.PInt(table.Rows[e.Row]["LabCaseNum"].ToString());
            FormLabCaseEdit FormL           = new FormLabCaseEdit();

            FormL.CaseCur = LabCases.GetOne(selectedLabCase);
            FormL.ShowDialog();
            FillGrid();
            for (int i = 0; i < table.Rows.Count; i++)
            {
                if (table.Rows[i]["LabCaseNum"].ToString() == selectedLabCase.ToString())
                {
                    gridMain.SetSelected(i, true);
                    break;
                }
            }
        }
Beispiel #3
0
        private void gridMain_CellDoubleClick(object sender, ODGridClickEventArgs e)
        {
            DataRow         row             = (DataRow)gridMain.Rows[e.Row].Tag;
            long            selectedLabCase = PIn.Long(row["LabCaseNum"].ToString());
            FormLabCaseEdit FormL           = new FormLabCaseEdit();

            FormL.CaseCur = LabCases.GetOne(selectedLabCase);
            FormL.ShowDialog();
            if (FormL.DialogResult != DialogResult.OK)
            {
                return;                //don't refresh unless we have to.  It messes up the user's ordering.
            }
            FillGrid();
            for (int i = 0; i < table.Rows.Count; i++)
            {
                if (table.Rows[i]["LabCaseNum"].ToString() == selectedLabCase.ToString())
                {
                    gridMain.SetSelected(i, true);
                    break;
                }
            }
        }