-------|>f_Patient.dateTimeNOW.Text = this.DGV.CurrentRow.Cells[7].Value.ToString();<|------ System.FormatException: 'The string was not recognized as a valid DateTime. There is an unknown word starting at index 0.'
private void btn_Update_FromGrid_Click(object sender, EventArgs e) { Forms.F_Patient f_Patient = new F_Patient(); f_Patient.btn_Add_NewPatient.Visible = false; f_Patient.btn_Delete.Visible = false; f_Patient.btn_Search.Visible = false; label1.Text = "Update Patient"; f_Patient.PatientIDTextBox.Text = this.DGV.CurrentRow.Cells[0].Value.ToString(); f_Patient.PatientTCTextBox.Text = this.DGV.CurrentRow.Cells[1].Value.ToString(); f_Patient.PatientNameTextBox.Text = this.DGV.CurrentRow.Cells[2].Value.ToString(); f_Patient.PatientAgeTextBox.Text = this.DGV.CurrentRow.Cells[3].Value.ToString(); if (this.DGV.CurrentRow.Cells[4].Value.ToString() == "Male") { f_Patient.radioButton_Male.Checked = true; } else { f_Patient.radioButton_Female.Checked = true; } f_Patient.PatientPhoneTextBox.Text = this.DGV.CurrentRow.Cells[5].Value.ToString(); f_Patient.comboBox_ShowState.SelectedItem = (this.DGV.CurrentRow.Cells[6].Value); f_Patient.dateTimeNOW.Text = this.DGV.CurrentRow.Cells[7].Value.ToString(); f_Patient.EmailTextBox.Text = this.DGV.CurrentRow.Cells[8].Value.ToString(); f_Patient.PatientCostTextBox.Text = this.DGV.CurrentRow.Cells[9].Value.ToString(); f_Patient.PayedTextBox.Text = this.DGV.CurrentRow.Cells[10].Value.ToString(); f_Patient.RemindTextBox.Text = this.DGV.CurrentRow.Cells[11].Value.ToString(); byte[] pa_img = (byte[])ShowImage.Show_Patient_Image(Convert.ToInt32(this.DGV.CurrentRow.Cells[0].Value)).Rows[0][0]; MemoryStream ms = new MemoryStream(pa_img); f_Patient.pictureBox1.Image = Image.FromStream(ms); f_Patient.NOTES_TextBox.Text = this.DGV.CurrentRow.Cells[12].Value.ToString(); f_Patient.ShowDialog(); }
f_Patient.dateTimeNOW
f_Patient.dateTimeNOW.Text = this.DGV.CurrentRow.Cells[7].Value.ToString();
f_Patient.dateTimeNOW.Value = this.DGV.CurrentRow.Cells[7].Value;
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)