123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using HNWD.Pregrant.Model;
- namespace HNWD.Pregrant.BusinessLogic
- {
- public abstract class App_CheckUpdateBase : BusinessLogicBase
- {
- private string deviceType = "";
- public WD_VerInfo wd_VerInfo = null;
- public App_CheckUpdateBase(string deviceType)
- {
- this.deviceType = deviceType;
- }
- public bool Check()
- {
- if (!this.InitializeDataAccess())
- {
- this.bSuccess = false;
- this.Message = PromptingMessage.Error_Data_Initialized;
- return false;
- }
- List<WD_VerInfo> lst_WD_VerInfo = wd_VerInfoDataAccess.ext.messageDataList.FindAll(f => f.VER_DEVICETYPE == this.deviceType).OrderByDescending(f => Convert.ToInt32(f.ID)).ToList();
-
- if (lst_WD_VerInfo == null || lst_WD_VerInfo.Count == 0)
- {
- this.bSuccess = false;
- this.Message = "无升级信息!";
- return false;
- }
- else
- {
- this.bSuccess = true;
- wd_VerInfo = lst_WD_VerInfo[0];
- }
- return this.bSuccess;
- }
- }
- }
|