private void gridPacientet_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex != -1) { Pacienti pacienti = new Pacienti(); pacienti.PacientiID = Convert.ToInt32(gridPacientet.Rows[e.RowIndex].Cells[0].Value); pacienti.Emri = Convert.ToString(gridPacientet.Rows[e.RowIndex].Cells[2].Value); pacienti.Mbiemri = Convert.ToString(gridPacientet.Rows[e.RowIndex].Cells[3].Value); pacienti.NrLeternjoftimit = Convert.ToString(gridPacientet.Rows[e.RowIndex].Cells[1].Value); pacienti.Gjinia = Convert.ToString(gridPacientet.Rows[e.RowIndex].Cells[4].Value); pacienti.DataLindjes = Convert.ToDateTime(gridPacientet.Rows[e.RowIndex].Cells[5].Value); pacienti.VendiLindjes = Convert.ToString(gridPacientet.Rows[e.RowIndex].Cells[6].Value); pacienti.Telefoni = Convert.ToString(gridPacientet.Rows[e.RowIndex].Cells[7].Value); pacienti.Email = Convert.ToString(gridPacientet.Rows[e.RowIndex].Cells[8].Value); pacienti.Addresa = Convert.ToString(gridPacientet.Rows[e.RowIndex].Cells[9].Value); FrmEditPacient frmedito = new FrmEditPacient(); frmedito.VendosTeDhenat(pacienti); frmedito.ShowDialog(); btn_SearchPatient_Click(sender, e); } }
private void FrmContent_Load(object sender, EventArgs e) { FrmEditPacient editoPacient = new FrmEditPacient(); Pacienti pacient = new Pacienti(); pacient.PacientiID = 1; //editoPacient.VendosTeDhenat(pacient); }