using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using HNWD.Pregrant.WebService; using HNWD.Pregrant.Model; using System.Text; using HNWD.Pregrant.DataAccess; using HNWD.Pregrant.Common; using HNWD.Pregrant.BusinessLogic; namespace HNWD.Pregrant.WebService.MgrCSharp { public partial class GetWD_VerInfo : PageBase { protected void Page_Load(object sender, EventArgs e) { string DeviceType = this.GetValueByKey("DeviceType"); if(string.IsNullOrEmpty(DeviceType)) { this.ResponseDefaultError(); return; } if (!this.InitializeDataAccess()) { this.ResponseDefaultError(); return; } List lst_WD_VerInfo = wd_VerInfoDataAccess.ext.messageDataList.FindAll(f => f.VER_DEVICETYPE == DeviceType).OrderByDescending(f => Convert.ToInt32(f.ID)).ToList(); if (lst_WD_VerInfo == null || lst_WD_VerInfo.Count == 0) { this.ResponseDefaultError("无升级信息!"); return ; } this.Response.Write(JsonHelper.SerializeWithSuffix(lst_WD_VerInfo[0])); } } }