using Newtonsoft.Json;
|
using System;
|
using System.Collections.Generic;
|
using System.IO;
|
using System.Linq;
|
using System.Web;
|
using WebSRM.Utility;
|
|
namespace WebSRM.layuiAdmin.std_v1._2._1.src.views.SRM.Api
|
{
|
/// <summary>
|
/// SRM_Web_PoBarCodeBillApi 的摘要说明
|
/// </summary>
|
public class SRM_Web_PoBarCodeBillApi : IHttpHandler
|
{
|
|
public void ProcessRequest(HttpContext context)
|
{
|
context.Response.ContentType = "application/json";
|
Stream stream = context.Request.InputStream;
|
var linterid = string.Empty;
|
using (StreamReader streamRead = new StreamReader(stream))
|
{
|
linterid = streamRead.ReadToEnd();
|
LogService.Write("Cache:"+ linterid);
|
}
|
//linterid = JsonConvert.SerializeObject(linterid);
|
var Cachekey = linterid.Split(';')[1];
|
var Cachevalue = linterid.Split(';')[0];
|
LogService.Write("Cachekey:" + Cachekey);
|
LogService.Write("Cachevalue:" + Cachevalue);
|
MemoryCacheHelper.SetCache(Cachekey, Cachevalue);
|
//HttpContext.Current.Session.Remove("linterid");
|
//HttpContext.Current.Session.Add("linterid", linterid);
|
|
}
|
|
public bool IsReusable
|
{
|
get
|
{
|
return false;
|
}
|
}
|
}
|
}
|