private void GenerateQR(Guid esrId, Guid memberId) { try { string dir = Server.MapPath("~/ExchangeQR/"); ExchangeServiceRecord esr = _exchangeServiceRecordBLL.GetESRById(esrId); string sourceString = "http://jcb.ybtx88.com/Pay/ConsumeExchangeService?esrId=" + esrId.ToString(); string qrPath = QRCodeCreator.Create(sourceString, dir); esr.QRPath = qrPath; ExchangeServiceQR qr = new ExchangeServiceQR(); qr.Id = Guid.NewGuid(); qr.CreatedTime = DateTime.Now; qr.DeletedTime = DateTime.MinValue.AddHours(8); qr.ExchangeServiceId = esr.Id; qr.IsDeleted = false; qr.MemberId = memberId; qr.QRPath = qrPath; _exchangeServiceQRBLL.Add(qr); _exchangeServiceRecordBLL.Update(esr); } catch (Exception ex) { LogHelper.Log.Write(ex.Message); LogHelper.Log.Write(ex.StackTrace); throw; } }
private void CreateServiceQR(Guid memberId, Guid serviceId) { try { string dir = Server.MapPath("~/QR/"); ServiceQR sqr = new ServiceQR(); sqr.Id = Guid.NewGuid(); sqr.IsDeleted = false; sqr.MemberId = memberId; sqr.ServcieId = serviceId; sqr.CreatedTime = DateTime.Now; sqr.DeletedTime = DateTime.MinValue.AddHours(8); string sourceString = "http://jcb.ybtx88.com/Pay/ConsumeService?serviceId=" + serviceId.ToString(); LogHelper.Log.Write("sourceString: " + sourceString); string qrPath = QRCodeCreator.Create(sourceString, dir); sqr.QRPath = qrPath; _serviceQRBLL.Add(sqr); } catch (Exception ex) { LogHelper.Log.Write(ex.Message); LogHelper.Log.Write(ex.StackTrace); throw; } }
public QrCodeStitcher() { _qrcode = new QRCodeCreator(); }