Exemplo n.º 1
0
        private void dgvPatientList_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            Point p = dgvPatientList.PointToClient(Cursor.Position);
            DataGridView.HitTestInfo hti = dgvPatientList.HitTest(p.X, p.Y);  // 取得したポイントからHitTestでセル位置取得

            if (hti.Type == DataGridViewHitTestType.Cell)
            {
                DataRowView drv = dgvPatientList.SelectedRows[0].DataBoundItem as DataRowView;
                DataRow dr = drv.Row;
                PatientMain pm = new PatientMain(dr[0].ToString());
                pm.Show();
                this.Close();
            }
        }
Exemplo n.º 2
0
        private void dgvPatientList_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            DataGridView dgv = (DataGridView)sender;
            Point p = dgvPatientList.PointToClient(Cursor.Position);
            DataGridView.HitTestInfo hti = dgvPatientList.HitTest(p.X, p.Y);  // 取得したポイントからHitTestでセル位置取得

            if ((hti.Type == DataGridViewHitTestType.Cell) && (dgv.Columns[e.ColumnIndex].Name == Properties.Resources.ptSelect))
            {
                DataRowView drv = dgvPatientList.SelectedRows[0].DataBoundItem as DataRowView;
                DataRow dr = drv.Row;
                PatientMain pm = new PatientMain(dr[0].ToString());
                pm.Show();
                this.Close();
            }
        }
Exemplo n.º 3
0
        private void dgvPatientList_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            Point p = dgvPatientList.PointToClient(Cursor.Position);

            DataGridView.HitTestInfo hti = dgvPatientList.HitTest(p.X, p.Y);  // 取得したポイントからHitTestでセル位置取得

            if (hti.Type == DataGridViewHitTestType.Cell)
            {
                DataRowView drv = dgvPatientList.SelectedRows[0].DataBoundItem as DataRowView;
                DataRow     dr  = drv.Row;
                PatientMain pm  = new PatientMain(dr[0].ToString());
                pm.Show();
                this.Close();
            }
        }
Exemplo n.º 4
0
        private void dgvPatientList_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            DataGridView dgv = (DataGridView)sender;
            Point        p   = dgvPatientList.PointToClient(Cursor.Position);

            DataGridView.HitTestInfo hti = dgvPatientList.HitTest(p.X, p.Y);  // 取得したポイントからHitTestでセル位置取得

            if ((hti.Type == DataGridViewHitTestType.Cell) && (dgv.Columns[e.ColumnIndex].Name == FindingsEditor.Properties.Resources.ptSelect))
            {
                DataRowView drv = dgvPatientList.SelectedRows[0].DataBoundItem as DataRowView;
                DataRow     dr  = drv.Row;
                PatientMain pm  = new PatientMain(dr[0].ToString());
                pm.Show();
                this.Close();
            }
        }
Exemplo n.º 5
0
        private void ptView()
        {
            if (string.IsNullOrWhiteSpace(tbPtID.Text))
            {
                MessageBox.Show(FindingsEditor.Properties.Resources.NoID, "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }

            patient pt1 = new patient(this.tbPtID.Text, false);

            if (pt1.ptExist)
            {
                PatientMain pm = new PatientMain(this.tbPtID.Text);
                pm.ShowDialog(this);
            }
            else
            {
                MessageBox.Show(FindingsEditor.Properties.Resources.OpenFormFailed, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Exemplo n.º 6
0
        private void ptView()
        {
            if (string.IsNullOrWhiteSpace(tbPtID.Text))
            {
                MessageBox.Show(Properties.Resources.NoID, "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }

            patient pt1 = new patient(this.tbPtID.Text, false);
            if (pt1.ptExist)
            {
                PatientMain pm = new PatientMain(this.tbPtID.Text);
                pm.ShowDialog(this);
            }
            else
            { MessageBox.Show(Properties.Resources.OpenFormFailed, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); }
        }