HeapDataManger.cs
资源名称:H3_OA.rar [点击查看]
上传用户:li2971742
上传日期:2021-11-18
资源大小:39096k
文件大小:2k
源码类别:
OA系统
开发平台:
C#
- using System;
- using System.Web;
- using System.Collections;
- using System.Web.Services;
- using System.Web.Services.Protocols;
- /// <summary>
- /// Summary description for HeapDataManger
- /// </summary>
- [WebService(Namespace = "http://tempuri.org/")]
- [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
- public class HeapDataManger : System.Web.Services.WebService
- {
- public HeapDataManger()
- {
- //Uncomment the following line if using designed components
- //InitializeComponent();
- }
- [WebMethod]
- public bool ExistItem(
- string InstanceId,
- string ItemName)
- {
- return OThinker.H3.Server.Engine.HeapDataManager.ExistItem(
- InstanceId,
- ItemName);
- }
- [WebMethod]
- public long CreateItem(
- string InstanceId,
- string ItemName,
- bool Memory,
- byte[] SerializedValue)
- {
- object itemValue = OThinker.Data.Convertor.ByteArrayToObject(SerializedValue, false);
- return OThinker.H3.Server.Engine.HeapDataManager.CreateItem(
- InstanceId,
- ItemName,
- Memory,
- itemValue);
- }
- // 获得所有的数据项名称
- [WebMethod]
- public string[] GetAllItemNames(string InstanceId)
- {
- return OThinker.H3.Server.Engine.HeapDataManager.GetAllItemNames(InstanceId);
- }
- // 获得所有的数据项
- [WebMethod]
- public byte[] GetAllItems(string InstanceId)
- {
- System.Collections.Specialized.ListDictionary dict
- = OThinker.H3.Server.Engine.HeapDataManager.GetAllItems(InstanceId);
- return OThinker.Data.Convertor.ObjectToByteArray(dict, false);
- }
- [WebMethod]
- public byte[] GetItemValue(
- string InstanceId,
- string ItemName)
- {
- object itemValue = OThinker.H3.Server.Engine.HeapDataManager.GetItemValue(
- InstanceId,
- ItemName);
- return OThinker.Data.Convertor.ObjectToByteArray(itemValue, false);
- }
- [WebMethod]
- public long SetItemValue(
- string InstanceId,
- string ItemName,
- byte[] SerializedValue)
- {
- object itemValue = OThinker.Data.Convertor.ByteArrayToObject(SerializedValue, false);
- return OThinker.H3.Server.Engine.HeapDataManager.SetItemValue(InstanceId, ItemName, itemValue);
- }
- }