コード例 #1
0
 private void btnInsert_Click(object sender, EventArgs e)
 {
     frmClinicEdit frmedit = new frmClinicEdit();
     frmClinicEdit.IdClinicEdit = 0;
     frmedit.ShowDialog();
     FillToGrid();
 }
コード例 #2
0
        private void btnInsert_Click(object sender, EventArgs e)
        {
            frmClinicEdit frmedit = new frmClinicEdit();

            frmClinicEdit.IdClinicEdit = 0;
            frmedit.ShowDialog();
            FillToGrid();
        }
コード例 #3
0
 private void btnEdit_Click(object sender, EventArgs e)
 {
     if ((lblID.Text == "") || (lblID.Text == "0"))
     {
         MessageBox.Show("Bạn hãy chọn phòng khám cần sửa!");
         return;
     }
     frmClinicEdit.IdClinicEdit = int.Parse(lblID.Text);
     frmClinicEdit frmedit = new frmClinicEdit();
     frmedit.ShowDialog();
     FillToGrid();
 }
コード例 #4
0
        private void btnEdit_Click(object sender, EventArgs e)
        {
            if ((lblID.Text == "") || (lblID.Text == "0"))
            {
                MessageBox.Show("Bạn hãy chọn phòng khám cần sửa!");
                return;
            }
            frmClinicEdit.IdClinicEdit = int.Parse(lblID.Text);
            frmClinicEdit frmedit = new frmClinicEdit();

            frmedit.ShowDialog();
            FillToGrid();
        }
コード例 #5
0
        private void grd_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.RowIndex == -1)
            {
                return;
            }
            if (grd.Rows[e.RowIndex].Cells["idDataGridViewTextBoxColumn"].Value == null)
            {
                IdClinic = 0;
            }

            else
            {
                IdClinic = int.Parse(grd.Rows[e.RowIndex].Cells["idDataGridViewTextBoxColumn"].Value.ToString());
            }
            lblID.Text = IdClinic.ToString();

            frmClinicEdit.IdClinicEdit = IdClinic;
            frmClinicEdit frmEdit = new frmClinicEdit();

            frmEdit.ShowDialog();
            FillToGrid();
        }
コード例 #6
0
        private void grd_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.RowIndex == -1) return;
            if (grd.Rows[e.RowIndex].Cells["idDataGridViewTextBoxColumn"].Value == null)
            {
                IdClinic = 0;
            }

            else
            {
                IdClinic = int.Parse(grd.Rows[e.RowIndex].Cells["idDataGridViewTextBoxColumn"].Value.ToString());
            }
            lblID.Text = IdClinic.ToString();

            frmClinicEdit.IdClinicEdit = IdClinic;
            frmClinicEdit frmEdit = new frmClinicEdit();
            frmEdit.ShowDialog();
            FillToGrid();
        }