GridReport二维码图片的显示

                        if (fieldCode == "qrCodeImg" && !string.IsNullOrEmpty(fieldValue))
                        {
                            if (Report.ControlByName("PictureBox1") != null)
                            {
                                string base64 = fieldValue.Substring(22);

                                byte[] bytes = Convert.FromBase64String(base64);

                                Report.ControlByName("PictureBox1").AsPictureBox.LoadFromMemory(ref bytes[0], (int)bytes.Length);
                            }
                        }

posted @ 2020-04-01 15:57  David-Ai  阅读(634)  评论(1编辑  收藏  举报