static Stream?GetQrCodeStream(IEnumerable <IGAPAuthenticatorDTO> datas) { var dtos = datas.Select(x => x.ToLightweightExportDTO()).ToArray(); var bytes = Serializable.SMP(dtos); #if DEBUG var bytes_compress_gzip = bytes.CompressByteArray(); #endif var bytes_compress_br = bytes.CompressByteArrayByBrotli(); #if DEBUG Toast.Show($"bytesLength, source: {bytes.Length}, gzip: {bytes_compress_gzip.Length}, br: {bytes_compress_br.Length}"); #endif (var result, var stream, var e) = QRCodeHelper.Create(bytes_compress_br); switch (result) { case QRCodeHelper.QRCodeCreateResult.DataTooLong: Toast.Show(AppResources.AuthLocal_ExportToQRCodeTooLongErrorTip); break; case QRCodeHelper.QRCodeCreateResult.Exception: e?.LogAndShowT(TAG); break; } return(stream); }
public static BitmapSource GetQRCode(string content, int size, string paytype) { Bitmap bitmap = QRCodeHelper.Create(content, size); IntPtr hbitmap = bitmap.GetHbitmap(); bool flag = paytype == "weixin"; Bitmap bitmap2; if (flag) { bitmap2 = new Bitmap(AppDomain.CurrentDomain.BaseDirectory + "pic\\qrcode1.png"); } else { bitmap2 = new Bitmap(AppDomain.CurrentDomain.BaseDirectory + "pic\\qrcode2.png"); } IntPtr hbitmap2 = bitmap2.GetHbitmap(); Bitmap bitmap3 = QRCodeHelper.MergeQrImg(bitmap, bitmap2, 0.23); IntPtr hbitmap3 = bitmap3.GetHbitmap(); BitmapSource result = Imaging.CreateBitmapSourceFromHBitmap(hbitmap3, IntPtr.Zero, Int32Rect.Empty, BitmapSizeOptions.FromEmptyOptions()); PayHelper.DeleteObject(hbitmap3); PayHelper.DeleteObject(hbitmap2); PayHelper.DeleteObject(hbitmap); bitmap3.Dispose(); bitmap2.Dispose(); bitmap.Dispose(); return(result); }
public ActionResult Index() { string str; long id = base.CurrentUser.Id; UserInviteModel memberInviteInfo = ServiceHelper.Create <IMemberInviteService>().GetMemberInviteInfo(id); InviteRuleInfo inviteRule = ServiceHelper.Create <IMemberInviteService>().GetInviteRule(); string host = base.Request.Url.Host; if (base.Request.Url.Port != 80) { int port = base.Request.Url.Port; str = string.Concat(":", port.ToString()); } else { str = ""; } string str1 = string.Concat(host, str); memberInviteInfo.InviteLink = string.Format("http://{0}/Register/index/{1}", str1, id); Bitmap bitmap = QRCodeHelper.Create(memberInviteInfo.InviteLink); MemoryStream memoryStream = new MemoryStream(); bitmap.Save(memoryStream, ImageFormat.Gif); string str2 = string.Concat("data:image/gif;base64,", Convert.ToBase64String(memoryStream.ToArray())); memoryStream.Dispose(); memberInviteInfo.QR = str2; Tuple <UserInviteModel, InviteRuleInfo, UserMemberInfo> tuple = new Tuple <UserInviteModel, InviteRuleInfo, UserMemberInfo>(memberInviteInfo, inviteRule, base.CurrentUser); return(View(tuple)); }
private string GetQRCode(string verificationCode) { //string qrCodeImagePath = string.Empty; //Image qrcode = Core.Helper.QRCodeHelper.Create(verificationCode); //string fileName = DateTime.Now.ToString("yyMMddHHmmssffffff") + ".jpg"; //qrCodeImagePath = CurrentUrlHelper.CurrentUrl() + "/temp/" + fileName; //qrcode.Save(Current.Server.MapPath("~/temp/") + fileName); //return qrCodeImagePath; string result = ""; if (!string.IsNullOrWhiteSpace(verificationCode)) { var qrcode = QRCodeHelper.Create(verificationCode); Bitmap bmp = new Bitmap(qrcode); MemoryStream ms = new MemoryStream(); bmp.Save(ms, System.Drawing.Imaging.ImageFormat.Png); byte[] arr = new byte[ms.Length]; ms.Position = 0; ms.Read(arr, 0, (int)ms.Length); ms.Close(); qrcode.Dispose(); result = Convert.ToBase64String(arr); result = "data:image/png;base64," + result; } return(result); }
// GET api/common/5 public string GetQRCode(string url, string logoUrl) { string result = @"{""returnCode"":""9999"",""returnMsg"":""请输入内容""}"; if (string.IsNullOrEmpty(url)) { return(result); } string timeStr = DateTime.Now.ToFileTime().ToString(); Bitmap bitmap; if (string.IsNullOrEmpty(logoUrl)) { bitmap = QRCodeHelper.Create(url); } else { bitmap = QRCodeHelper.CreateQRCodeWithLogo(url, logoUrl); } string fileName = System.Web.HttpContext.Current.Server.MapPath("~") + "\\Images\\" + timeStr + ".jpg"; bitmap.Save(fileName); //保存位图 string imageUrl = "../../Images/" + timeStr + ".jpg"; //显示图片 return(@"{""returnCode"":""0000"",""returnMsg"":""" + imageUrl + @"""}"); }
public ActionResult Index() { string str; ViewBag.WeiXin = false; if (!string.IsNullOrWhiteSpace(_siteSetting.WeixinAppId) && !string.IsNullOrWhiteSpace(_siteSetting.WeixinAppSecret) && base.PlatformType == ChemCloud.Core.PlatformType.WeiXin) { ViewBag.WeiXin = true; string empty = string.Empty; IWXApiService wXApiService = ServiceHelper.Create <IWXApiService>(); empty = wXApiService.GetTicket(_siteSetting.WeixinAppId, _siteSetting.WeixinAppSecret); JSSDKHelper jSSDKHelper = new JSSDKHelper(); string timestamp = JSSDKHelper.GetTimestamp(); string noncestr = JSSDKHelper.GetNoncestr(); string signature = jSSDKHelper.GetSignature(empty, noncestr, timestamp, base.Request.Url.AbsoluteUri); ViewBag.Timestamp = timestamp; ViewBag.NonceStr = noncestr; ViewBag.Signature = signature; ViewBag.AppId = _siteSetting.WeixinAppId; } long id = base.CurrentUser.Id; UserInviteModel memberInviteInfo = ServiceHelper.Create <IMemberInviteService>().GetMemberInviteInfo(id); InviteRuleInfo inviteRule = ServiceHelper.Create <IMemberInviteService>().GetInviteRule(); MemberIntegralExchangeRules integralChangeRule = ServiceHelper.Create <IMemberIntegralService>().GetIntegralChangeRule(); if (integralChangeRule != null) { dynamic viewBag = base.ViewBag; int value = inviteRule.InviteIntegral.Value / integralChangeRule.IntegralPerMoney; viewBag.IntergralMoney = value.ToString("f2"); } string host = base.Request.Url.Host; string str1 = host; if (base.Request.Url.Port != 80) { int port = base.Request.Url.Port; str = string.Concat(":", port.ToString()); } else { str = ""; } host = string.Concat(str1, str); memberInviteInfo.InviteLink = string.Format("http://{0}/Register/index/{1}", host, id); inviteRule.ShareIcon = string.Format("http://{0}{1}", host, inviteRule.ShareIcon); Bitmap bitmap = QRCodeHelper.Create(memberInviteInfo.InviteLink); MemoryStream memoryStream = new MemoryStream(); bitmap.Save(memoryStream, ImageFormat.Gif); string str2 = string.Concat("data:image/gif;base64,", Convert.ToBase64String(memoryStream.ToArray())); memoryStream.Dispose(); memberInviteInfo.QR = str2; Tuple <UserInviteModel, InviteRuleInfo, UserMemberInfo> tuple = new Tuple <UserInviteModel, InviteRuleInfo, UserMemberInfo>(memberInviteInfo, inviteRule, base.CurrentUser); return(View(tuple)); }
//生成二维码 public void generateQRImage() { string currentPath = System.Web.HttpContext.Current.Server.MapPath(System.Web.HttpContext.Current.Request.ApplicationPath + "" + @"/Content/Qr_code_img"); string content = generateRecommendUrl(); Bitmap RQBmp = QRCodeHelper.Create(content, 410); RQBmp = QRCodeHelper.GetThumbnail(RQBmp, 400, 400); SaveImg(currentPath, RQBmp); }
public JsonResult StoresLink(string vshopUrl) { string str = string.Empty; if (!string.IsNullOrWhiteSpace(vshopUrl)) { Bitmap bitmap = QRCodeHelper.Create(vshopUrl); MemoryStream stream = new MemoryStream(); bitmap.Save(stream, ImageFormat.Bmp); str = "data:image/gif;base64," + Convert.ToBase64String(stream.ToArray()); stream.Dispose(); } return(base.Json(new { success = true, qrCodeImagePath = str }, JsonRequestBehavior.AllowGet)); }
static void Main(string[] args) { #region 測試一、生成中間沒有LOGO的二維碼 //需要生成二維碼的內容 //string content = "https://www.pchome.com.tw"; //Bitmap bitmap = QRCodeHelper.Create(content, 300); //string filename = DateTime.Now.ToFileTime().ToString(); //string saveFileUrl = string.Format(@"D:\RQCode\{0}.png", filename); //bitmap.Save(saveFileUrl, System.Drawing.Imaging.ImageFormat.Png); //bitmap.Dispose(); //釋放資源 #endregion #region 測試二、生成帶有LOGO二維碼 //string qrFileUrl = @"D:\RQCode\131983000614535443.png"; //string headerFileUrl = @"D:\RQCode\YFP.jpg"; //string filename = DateTime.Now.ToFileTime().ToString(); //string saveFileUrl = string.Format(@"D:\RQCode\{0}.png", filename); //Bitmap qrCodeBitmap = new Bitmap(qrFileUrl); //Bitmap headerBitmap = new Bitmap(headerFileUrl); //Bitmap qrAndHeaderBitmap = QRCodeHelper.MergeQrImg(qrCodeBitmap, headerBitmap); //qrAndHeaderBitmap.Save(saveFileUrl, System.Drawing.Imaging.ImageFormat.Png); //qrAndHeaderBitmap.Dispose(); //釋放資源 //qrCodeBitmap.Dispose(); //headerBitmap.Dispose(); #endregion #region 測試三、生成無LOGO和有LOGO的二維碼 string content = "http://www.yfp.com.tw/"; Bitmap bitmap = QRCodeHelper.Create(content, 400); string qrCodefilename = DateTime.Now.ToFileTime().ToString(); string qrCodeSaveFileUrl = string.Format(@"D:\RQCode\{0}.png", qrCodefilename); bitmap.Save(qrCodeSaveFileUrl, System.Drawing.Imaging.ImageFormat.Png); string headerFileUrl = @"D:\RQCode\YFP.jpg"; string filename = DateTime.Now.ToFileTime().ToString(); string saveFileUrl = string.Format(@"D:\RQCode\{0}.png", filename); Bitmap headerBitmap = new Bitmap(headerFileUrl); Bitmap qrAndHeaderBitmap = QRCodeHelper.MergeQrImg(bitmap, headerBitmap); qrAndHeaderBitmap.Save(saveFileUrl, System.Drawing.Imaging.ImageFormat.Png); qrAndHeaderBitmap.Dispose(); //釋放資源 bitmap.Dispose(); headerBitmap.Dispose(); #endregion // Console.ReadLine(); }
public IActionResult GetQRPic(string info) { //BitMatrix byteMatrix = new MultiFormatWriter().encode(info, BarcodeFormat.QR_CODE, 300, 300); //System.Drawing.Bitmap bitmap = toBitmap(byteMatrix); System.Drawing.Bitmap qr = QRCodeHelper.Create(info, 200); System.Drawing.Bitmap icon = new System.Drawing.Bitmap("../../../../../../../../../../../../../../home/temp/print.png"); System.Drawing.Bitmap bitmap = QRCodeHelper.MergeQrImg(qr, icon); MemoryStream ms = new MemoryStream(); bitmap.Save(ms, System.Drawing.Imaging.ImageFormat.Bmp); byte[] data = ms.GetBuffer(); return(File(data, "Image/png", Guid.NewGuid().ToString("N") + ".png")); }
private string GenerateQR(string path) { Bitmap bitmap = QRCodeHelper.Create(path); Guid guid = Guid.NewGuid(); string str = string.Concat(guid.ToString(), ".jpg"); string str1 = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Storage", "Shop", "Bonus"); string str2 = Path.Combine(str1, str); if (!Directory.Exists(str1)) { Directory.CreateDirectory(str1); } bitmap.Save(str2); return(string.Concat("/Storage/Shop/Bonus/", str)); }
/// <summary> /// 创建商家二维码 /// </summary> /// <param name="XShow"></param> /// <returns></returns> public ActionResult CreateQRCode(string XShow) { string shopUrl = string.Empty; if (CurrentInfo.GetCurrentShopType() == ShopTypeEnum.美容美发)//美容美发显示奇策,奇策的显示美容美发的 { shopUrl = "http://www.bbbb4.com/home/jkxt/?XShow=" + XShow; } else { shopUrl = "http://mf.iqcrj.com/homemeifa/jkxt/?XShow=" + XShow; } QRCodeHelper qrCode = new QRCodeHelper(); Bitmap qrImg = qrCode.Create(shopUrl, 12); MemoryStream ms = new MemoryStream(); qrImg.Save(ms, System.Drawing.Imaging.ImageFormat.Bmp); byte[] bytes = ms.GetBuffer(); return(File(bytes, @"image/jpeg")); }
public object GetPickupCodeQRCode(string pickupCode) { string result = ""; if (!string.IsNullOrWhiteSpace(pickupCode)) { var qrcode = QRCodeHelper.Create(pickupCode); Bitmap bmp = new Bitmap(qrcode); MemoryStream ms = new MemoryStream(); bmp.Save(ms, System.Drawing.Imaging.ImageFormat.Png); byte[] arr = new byte[ms.Length]; ms.Position = 0; ms.Read(arr, 0, (int)ms.Length); ms.Close(); qrcode.Dispose(); result = Convert.ToBase64String(arr); result = "data:image/png;base64," + result; } return(Json(result)); }
public ActionResult QRPay(string url, string id) { ViewBag.Logo = ServiceHelper.Create <ISiteSettingService>().GetSiteSettings().Logo; Plugin <IPaymentPlugin> plugin = PluginsManagement.GetPlugin <IPaymentPlugin>(id); ViewBag.Title = string.Concat(plugin.PluginInfo.DisplayName, "支付"); ViewBag.Name = plugin.PluginInfo.DisplayName; Bitmap bitmap = QRCodeHelper.Create(url); DateTime now = DateTime.Now; string str = string.Concat(now.ToString("yyMMddHHmmssffffff"), ".jpg"); string str1 = string.Concat("/temp/", str); bitmap.Save(string.Concat(Server.MapPath("~/temp/"), str)); ViewBag.QRCode = str1; dynamic viewBag = base.ViewBag; string classFullName = plugin.PluginInfo.ClassFullName; char[] chrArray = new char[] { ',' }; viewBag.HelpImage = string.Concat("/Plugins/Payment/", classFullName.Split(chrArray)[1], "/", plugin.Biz.HelpImage); ViewBag.Step = 2; return(View()); }
public ActionResult Detail(long Id) { string str; CouponInfo couponInfo = ServiceHelper.Create <ICouponService>().GetCouponInfo(base.CurrentSellerManager.ShopId, Id); if (couponInfo != null && couponInfo.IsSyncWeiXin == 1 && couponInfo.WXAuditStatus != 1) { throw new HimallException("同步微信优惠券未审核通过时不可修改。"); } string host = base.Request.Url.Host; string str1 = host; if (base.Request.Url.Port != 80) { int port = base.Request.Url.Port; str = string.Concat(":", port.ToString()); } else { str = ""; } host = string.Concat(str1, str); ViewBag.Url = string.Format("http://{0}/m-wap/vshop/CouponInfo/{1}", host, couponInfo.Id); dynamic viewBag = QRCodeHelper.Create(ViewBag.Url); MemoryStream memoryStream = new MemoryStream(); viewBag.Save(memoryStream, ImageFormat.Gif); string str2 = string.Concat("data:image/gif;base64,", Convert.ToBase64String(memoryStream.ToArray())); memoryStream.Dispose(); ViewBag.Image = str2; dynamic obj = base.ViewBag; DateTime dateTime = ServiceHelper.Create <IMarketService>().GetMarketService(base.CurrentSellerManager.ShopId, MarketType.Coupon).MarketServiceRecordInfo.Max <MarketServiceRecordInfo, DateTime>((MarketServiceRecordInfo item) => item.EndTime); obj.EndTime = dateTime.ToString("yyyy-MM-dd"); return(View(couponInfo)); }
internal async Task <byte[]> GetQRPic(string uniacid, ObjectId accountID, string contentRootPath) { var account = GetModelByIDAndUniacID(accountID, uniacid); if (string.IsNullOrEmpty(account.AccountPhoneNumber) || string.IsNullOrEmpty(account.CarNumber)) { string no_qrPath = $@"{contentRootPath}/wwwroot/images/no_qr.jpg"; return(File.ReadAllBytes(no_qrPath)); } byte[] qrData; var bucket = new GridFSBucket(mongoDB); if (account.QRFileID != ObjectId.Empty) { return(await bucket.DownloadAsBytesAsync(account.QRFileID)); } string qrInfo = $@"{We7Config.SiteRoot}account/GetAccountInfo?uniacid={uniacid}&AccountID={account.AccountID}"; Bitmap qr = QRCodeHelper.Create(qrInfo, 300); Image qrRaw = ImageTools.ResizeImage(qr, 286, 286, 0); string bgPath = $@"{contentRootPath}/wwwroot/images/qr_bg.jpg"; Bitmap qrBit = ImageTools.CombinImage(new Bitmap(bgPath), qrRaw, 171, 128); MemoryStream ms = new MemoryStream(); qrBit.Save(ms, ImageFormat.Jpeg); qrData = ms.GetBuffer(); var options = new GridFSUploadOptions { Metadata = new BsonDocument { { "content-type", "Image/jpg" } } }; var id = await bucket.UploadFromBytesAsync($"qr_{accountID.ToString()}.jpg", qrData, options); collection.UpdateOne(x => x.AccountID.Equals(accountID) && x.uniacid.Equals(uniacid), Builders <AccountModel> .Update.Set(x => x.QRFileID, id)); return(qrData); }
public ActionResult Introduce(long id) { Image image; VShopInfo vShop = ServiceHelper.Create <IVShopService>().GetVShop(id); string empty = string.Empty; if (vShop != null) { object[] host = new object[] { "http://", base.HttpContext.Request.Url.Host, "/m-", ChemCloud.Core.PlatformType.WeiXin.ToString(), "/vshop/detail/", id }; string str = string.Concat(host); string str1 = Server.MapPath(vShop.Logo); image = (string.IsNullOrWhiteSpace(vShop.Logo) || !System.IO.File.Exists(str1) ? QRCodeHelper.Create(str) : QRCodeHelper.Create(str, str1)); DateTime now = DateTime.Now; string str2 = string.Concat(now.ToString("yyMMddHHmmssffffff"), ".jpg"); empty = string.Concat("/temp/", str2); image.Save(string.Concat(Server.MapPath("~/temp/"), str2)); } ViewBag.QRCode = empty; if (base.CurrentUser != null) { ViewBag.IsFavorite = ServiceHelper.Create <IShopService>().IsFavoriteShop(base.CurrentUser.Id, vShop.ShopId); } else { ViewBag.IsFavorite = false; } ShopServiceMarkModel shopComprehensiveMark = ShopServiceMark.GetShopComprehensiveMark(vShop.ShopId); dynamic viewBag = base.ViewBag; decimal comprehensiveMark = shopComprehensiveMark.ComprehensiveMark; viewBag.shopMark = comprehensiveMark.ToString(); IQueryable <StatisticOrderCommentsInfo> shopStatisticOrderComments = ServiceHelper.Create <IShopService>().GetShopStatisticOrderComments(vShop.ShopId); StatisticOrderCommentsInfo statisticOrderCommentsInfo = ( from c in shopStatisticOrderComments where (int)c.CommentKey == 1 select c).FirstOrDefault(); StatisticOrderCommentsInfo statisticOrderCommentsInfo1 = ( from c in shopStatisticOrderComments where (int)c.CommentKey == 9 select c).FirstOrDefault(); StatisticOrderCommentsInfo statisticOrderCommentsInfo2 = ( from c in shopStatisticOrderComments where (int)c.CommentKey == 5 select c).FirstOrDefault(); StatisticOrderCommentsInfo statisticOrderCommentsInfo3 = ( from c in shopStatisticOrderComments where (int)c.CommentKey == 2 select c).FirstOrDefault(); StatisticOrderCommentsInfo statisticOrderCommentsInfo4 = ( from c in shopStatisticOrderComments where (int)c.CommentKey == 10 select c).FirstOrDefault(); StatisticOrderCommentsInfo statisticOrderCommentsInfo5 = ( from c in shopStatisticOrderComments where (int)c.CommentKey == 6 select c).FirstOrDefault(); StatisticOrderCommentsInfo statisticOrderCommentsInfo6 = ( from c in shopStatisticOrderComments where (int)c.CommentKey == 3 select c).FirstOrDefault(); StatisticOrderCommentsInfo statisticOrderCommentsInfo7 = ( from c in shopStatisticOrderComments where (int)c.CommentKey == 4 select c).FirstOrDefault(); StatisticOrderCommentsInfo statisticOrderCommentsInfo8 = ( from c in shopStatisticOrderComments where (int)c.CommentKey == 11 select c).FirstOrDefault(); StatisticOrderCommentsInfo statisticOrderCommentsInfo9 = ( from c in shopStatisticOrderComments where (int)c.CommentKey == 12 select c).FirstOrDefault(); StatisticOrderCommentsInfo statisticOrderCommentsInfo10 = ( from c in shopStatisticOrderComments where (int)c.CommentKey == 7 select c).FirstOrDefault(); StatisticOrderCommentsInfo statisticOrderCommentsInfo11 = ( from c in shopStatisticOrderComments where (int)c.CommentKey == 8 select c).FirstOrDefault(); int num = 5; if (statisticOrderCommentsInfo == null || statisticOrderCommentsInfo3 == null) { ViewBag.ProductAndDescription = num; ViewBag.ProductAndDescriptionPeer = num; ViewBag.ProductAndDescriptionMin = num; ViewBag.ProductAndDescriptionMax = num; } else { ViewBag.ProductAndDescription = statisticOrderCommentsInfo.CommentValue; ViewBag.ProductAndDescriptionPeer = statisticOrderCommentsInfo3.CommentValue; ViewBag.ProductAndDescriptionMin = statisticOrderCommentsInfo7.CommentValue; ViewBag.ProductAndDescriptionMax = statisticOrderCommentsInfo6.CommentValue; } if (statisticOrderCommentsInfo1 == null || statisticOrderCommentsInfo4 == null) { ViewBag.SellerServiceAttitude = num; ViewBag.SellerServiceAttitudePeer = num; ViewBag.SellerServiceAttitudeMax = num; ViewBag.SellerServiceAttitudeMin = num; } else { ViewBag.SellerServiceAttitude = statisticOrderCommentsInfo1.CommentValue; ViewBag.SellerServiceAttitudePeer = statisticOrderCommentsInfo4.CommentValue; ViewBag.SellerServiceAttitudeMax = statisticOrderCommentsInfo8.CommentValue; ViewBag.SellerServiceAttitudeMin = statisticOrderCommentsInfo9.CommentValue; } if (statisticOrderCommentsInfo5 == null || statisticOrderCommentsInfo2 == null) { ViewBag.SellerDeliverySpeed = num; ViewBag.SellerDeliverySpeedPeer = num; ViewBag.SellerDeliverySpeedMax = num; ViewBag.sellerDeliverySpeedMin = num; } else { ViewBag.SellerDeliverySpeed = statisticOrderCommentsInfo2.CommentValue; ViewBag.SellerDeliverySpeedPeer = statisticOrderCommentsInfo5.CommentValue; ViewBag.SellerDeliverySpeedMax = statisticOrderCommentsInfo10.CommentValue; ViewBag.sellerDeliverySpeedMin = statisticOrderCommentsInfo11.CommentValue; } return(View(vShop)); }
public ActionResult Management() { Image image; VShopInfo vShopByShopId = ServiceHelper.Create <IVShopService>().GetVShopByShopId(base.CurrentSellerManager.ShopId); string empty = string.Empty; if (vShopByShopId != null) { object[] host = new object[] { "http://", base.HttpContext.Request.Url.Host, "/m-", PlatformType.WeiXin.ToString(), "/vshop/detail/", vShopByShopId.Id }; string str = string.Concat(host); string str1 = Server.MapPath(vShopByShopId.Logo); image = (string.IsNullOrWhiteSpace(vShopByShopId.Logo) || !System.IO.File.Exists(str1) ? QRCodeHelper.Create(str) : QRCodeHelper.Create(str, str1)); DateTime now = DateTime.Now; string str2 = string.Concat(now.ToString("yyMMddHHmmssffffff"), ".jpg"); empty = string.Concat("/temp/", str2); image.Save(string.Concat(Server.MapPath("~/temp/"), str2)); image.Dispose(); } ViewBag.QRCode = empty; ViewBag.ShopId = base.CurrentSellerManager.ShopId; return(View(vShopByShopId)); }