public void SendParish(DataGridView datagrid) { frmActivities FA = new frmActivities(); frmDataParishioners frm = new frmDataParishioners("ModifyParish", this, FA); selectedParish = Convert.ToInt32(datagrid.CurrentRow.Index.ToString()); DataGridViewRow dgv = datagrid.Rows[selectedParish]; frm.parishId = Convert.ToInt32(dgv.Cells["clmId"].Value); frm.txtName.Text = dgv.Cells["Nombre"].Value.ToString(); frm.txtSurname.Text = dgv.Cells["Apellido"].Value.ToString(); frm.txtDocumento.Text = dgv.Cells["clmDocumento"].Value.ToString(); if (dgv.Cells["FechaNac"].Value?.ToString() != "") { frm.chbDateTime.Checked = true; frm.dtBornDate.Value = DateTime.Parse(dgv.Cells["FechaNac"].Value.ToString()); } else { frm.chbDateTime.Checked = false; frm.dtBornDate.Enabled = false; frm.dtBornDate.Value = DateTime.Today; } frm.txtTelephone.Text = dgv.Cells["Telephone"].Value.ToString(); frm.txtAddress.Text = dgv.Cells["Address"].Value.ToString(); frm.txtMail.Text = dgv.Cells["Mail"].Value.ToString(); frm.txtObservation.Text = dgv.Cells["clmObservation"].Value.ToString(); frm.telephoneId = Convert.ToInt32(dgv.Cells["clmParishionerPhoneId"].Value); frm.addressId = Convert.ToInt32(dgv.Cells["clmParishionerAddressId"].Value); frm.mailId = Convert.ToInt32(dgv.Cells["clmParishionerMailId"].Value); frm.ShowDialog(); }
private void BtnNewParishioner_Click(object sender, EventArgs e) { frmParishioners FP = new frmParishioners(); frmDataParishioners FDP = new frmDataParishioners("NewParish", FP, owner); FDP.ShowDialog(); }
private void BtnNew_Click(object sender, EventArgs e) { frmActivities FA = new frmActivities(); frmDataParishioners FDP = new frmDataParishioners("NewParish", this, FA); FDP.ShowDialog(); }