2025-03-27 15:05:14 +08:00

85 lines
3.3 KiB
C#

using HZQR.Common;
using QRWL.Common;
using QRWL.Web.Common;
using SuperMap.RealEstate.CoreFrameWork;
using SuperMap.RealEstate.CoreFrameWork.Dictionary.Business;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using Business = SuperMap.RealEstate.HighWay.Storage.Business;
using SendRecStorage = SuperMap.RealEstate.SendRec.Storage;
namespace SuperMap.RealEstate.SendRec.Handler
{
/// <summary>
/// handler_ajax 的摘要说明
/// </summary>
public class handler_ajax : IHttpHandler
{
public void ProcessRequest(HttpContext context)
{
ServiceModel.Transaction _Transaction = new ServiceModel.Transaction();
string action_type = HttpContext.Current.Request.Form["action_type"];
string action_data = HttpContext.Current.Request.Form["action_data"];
List<ServerPartObject> _ListServerPartObject = null;
string reString = string.Empty;
string StrSql = string.Empty;
List<TreeItem> _ListTreeItem = null;
switch (action_type)
{
#region
case "getApplyCommodity":
try
{
//获得枚举信息
Dictionary<string,string> _DictString = DictionaryHelper.GetDictionaryKeyValue(_Transaction, "COMMODITY_UNIT");
List<SuperMap.RealEstate.SendRec.Storage.Model.APPLYCOMMODITY> _ListAPPLYCOMMODITY = new List<Storage.Model.APPLYCOMMODITY>();
foreach (SendRecStorage.Business.APPLYCOMMODITY _APPLYCOMMODITY in (new SendRecStorage.Business.APPLYCOMMODITY(_Transaction)).FillCollection(
"where APPLYPROINST_ID =" + action_data.ToDecrypt() + ""))
{
foreach (var item in _DictString)
{
if (_APPLYCOMMODITY.PropertyObject.UNIT.ToString() == item.Key)
{
_APPLYCOMMODITY.PropertyObject.PURCHASEDETAIL_DESC = item.Value;
break;
}
else
{
_APPLYCOMMODITY.PropertyObject.PURCHASEDETAIL_DESC = "";
}
}
_ListAPPLYCOMMODITY.Add(_APPLYCOMMODITY.PropertyObject);
}
reString = JsonHelper.ListToJson<SuperMap.RealEstate.SendRec.Storage.Model.APPLYCOMMODITY>(_ListAPPLYCOMMODITY, "APPLYCOMMODITY");
}
catch (Exception ex)
{
reString = "error:" + ex.Message;
}
break;
#endregion
default:
reString = "error";
break;
}
context.Response.ContentType = "text/plain";
context.Response.Write(reString);
context.Response.End();
}
public bool IsReusable
{
get
{
return false;
}
}
}
}