Click here to Skip to main content
15,891,943 members

Comments by ahmedbelal (Top 34 by date)

ahmedbelal 9-Jul-22 0:56am View    
Thank you for your Helping me OriginalGriff
but i want tell him to save image null if it's null during Edit Custmer data without upload image again
but it force me to upload image again
ahmedbelal 29-May-22 12:52pm View    
Compiler tell me that Error here

pictureBox_ForTRAINER.Image.Save(ms1, pictureBox_ForTRAINER.Image.RawFormat);
ahmedbelal 10-Apr-22 8:45am View    
Mr Richard
Do you want to write my StoredProcedure and More Codes ?
ahmedbelal 10-Apr-22 7:37am View    
it worked Here

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.Value = Convert.ToDateTime(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();
}
ahmedbelal 10-Apr-22 7:35am View    
thanks Richard
But,
i repeat my question because it already worked in another project
So i want to Know why doesn't work