public System.Drawing.Image byteArrayToImage(int state, int reqID) { var dt = business.GetSignByLogDate(state, reqID); byte[] imgByte = null; if (dt != null && dt.Rows.Count > 0) { imgByte = (byte[])dt.Rows[0]["SignImage"]; } //(from r in _signList.AsEnumerable() // where (r.Field<Int64>("RequestLogID") == stat) // //RequestLogID dar jadvale userlog eventesh fargh dare bayad // //bebine ke oon event baraye oon modifyID dar che tarikhi rokh // //dade bad logdate bayad dar jadvale emzaha dide shavad ke in // //RequestLogID dar oon tarikhemzaye ki mioftade // select r.Field<byte[]>("SignImage")).SingleOrDefault(); if (imgByte != null) { using (MemoryStream imgStream = new MemoryStream(imgByte)) { return(System.Drawing.Image.FromStream(imgStream)); } } return(null); }