123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using HNWD.Pregrant.Model;
- using HNWD.Pregrant.DataAccess;
- namespace HNWD.Pregrant.BusinessLogic
- {
- public class WD_ZoneInfoBusinessLogic : BusinessLogicBase2<WD_ZoneInfo>
- {
- public WD_ZoneInfoBusinessLogic(string ActionFlag)
- : base()
- {
- this.ActionFlag = ActionFlag;
- }
- public WD_ZoneInfoExt QueryAll()
- {
- this.wd_ZoneInfoDataAccess.QueryAll();
- return this.wd_ZoneInfoDataAccess.ext;
- }
- public override ModelExtBase<WD_ZoneInfo> Query(string id)
- {
- this.wd_ZoneInfoDataAccess.QueryAll();
- this.wd_ZoneInfoDataAccess.ext.messageDataList = this.wd_ZoneInfoDataAccess.ext.messageDataList.FindAll(f => f.ID == id).ToList();
- return this.wd_ZoneInfoDataAccess.ext;
- }
- public override ModelBase Business(string data)
- {
- base.Business(data);
- this.wd_ZoneInfoDataAccess.Business(this.insert_list, update_list, delete_list);
- return this.DefaultReturn();
- }
- protected override void Dispatch(string data)
- {
- if(data.Length == 0)
- {
- this.bSuccess = false;
- this.Message = "传入数据长度必须大于0";
- return;
- }
- string[] items = data.Split(new char[]{'$'});
- foreach(string item in items)
- {
-
- string[] subitems = item.Split(new char[]{'@'});
- WD_ZoneInfo wd_ZoneInfo = new WD_ZoneInfo()
- {
- ID = subitems[1],
- ZONE_ZONEID = subitems[2],
- ZONE_FILELIST = subitems[3],
- ZONE_STATUS = subitems[4],
- ZONE_CONTENT = subitems[5],
- ZONE_WEEK = subitems[6],
- ZONE_STARTTIME = subitems[7],
- ZONE_ENDTIME = subitems[8],
- ZONE_DATETIME = subitems[9],
- };
- if(subitems[0].ToLower() == "i")
- {
- this.insert_list.Add(wd_ZoneInfo);
- }
- if (subitems[0].ToLower() == "u")
- {
- this.update_list.Add(wd_ZoneInfo);
- }
- if (subitems[0].ToLower() == "d")
- {
- this.delete_list.Add(wd_ZoneInfo);
- }
- }
- }
- }
- }
|