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(); } }
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(); } }