コード例 #1
0
 private void TOPLkLbl_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
 {
     using (ClinicEntities1 db = new ClinicEntities1())
     {
         TypeOfProcedures    top  = db.TypeOfProcedures.Where(x => x.Name == TOPLkLbl.Text).FirstOrDefault <TypeOfProcedures>();
         TypeOfProcedureCard topc = new TypeOfProcedureCard();
         topc.Currentid = top.Id;
         topc.ShowDialog();
     }
 }
コード例 #2
0
        private void dataGridView7_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            TypeOfProcedureCard tpcard = new TypeOfProcedureCard();
            int id = Convert.ToInt32(this.dataGridView7.CurrentRow.Cells[0].Value);

            using (ClinicEntities1 db = new ClinicEntities1())
            {
                TypeOfProcedures t = db.TypeOfProcedures.Find(id);
                tpcard.Currentid = id;
                tpcard.ShowDialog();
                FillGrid();
            }
        }