private void btnToPB_Click(object sender,EventArgs e)
{
RefreshDBConnection();
rowNumber=0;
pictureBox1.Image=ReadImageFromDB();
btnToPB.Text="view 1st
private Image ReadImageFromDB()
{
Image FetchdImg;
if(rowNumber >=0)
{
byte[]FetchedImgBytes=(byte[]LocalDataTable.Rows[rowNumber]["Photo"];
MemoryStream stream=new MemoryStream(FetchedImgBytes);
FetchedImg=Image.FromStream(stream);
return FetchedImg;
else
{
MessageBox.Show("there are no image in the database yet.please reconnect od add some Image");
return null;
}