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 { /// /// handler_ajax 的摘要说明 /// 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 _ListServerPartObject = null; string reString = string.Empty; string StrSql = string.Empty; List _ListTreeItem = null; switch (action_type) { #region 获得申请商品 case "getApplyCommodity": try { //获得枚举信息 Dictionary _DictString = DictionaryHelper.GetDictionaryKeyValue(_Transaction, "COMMODITY_UNIT"); List _ListAPPLYCOMMODITY = new List(); 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(_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; } } } }