1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495 |
- 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_NurseCfgInfoBusinessLogic : BusinessLogicBase2<WD_NurseCfgInfo>
- {
- private string id = string.Empty;
- public WD_NurseCfgInfoBusinessLogic(string id)
- : base()
- {
- this.id = id;
- }
- public WD_NurseCfgInfoExt QueryAll()
- {
- this.wd_NurseCfgInfoDataAccess.QueryAll();
- return this.wd_NurseCfgInfoDataAccess.ext;
- }
- public override ModelExtBase<WD_NurseCfgInfo> Query(string patientid)
- {
- this.wd_NurseCfgInfoDataAccess.QueryAll();
- this.wd_NurseCfgInfoDataAccess.ext.messageDataList = this.wd_NurseCfgInfoDataAccess.ext.messageDataList.FindAll(f => f.ID == this.id).ToList();
- return this.wd_NurseCfgInfoDataAccess.ext;
- }
- public override ModelBase Business(string data)
- {
- base.Business(data);
- this.wd_NurseCfgInfoDataAccess.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_NurseCfgInfo wd_NurseCfgInfo = new WD_NurseCfgInfo()
- {
- ID = subitems[0],
- NURSECFG_ID = subitems[1],
- NURSECFG_VALUE = subitems[2],
- NURSECFG_HIS_VALUE = subitems[3],
- NURSECFG_NAME = subitems[4],
- NURSECFG_COLOR = subitems[5] ,
- NURSECFG_CONTENT = subitems[6],
- NURSECFG_DATETIME = subitems[7]
- };
-
- if(subitems[0].ToLower() == "i")
- {
- this.insert_list.Add(wd_NurseCfgInfo);
- }
- if (subitems[0].ToLower() == "u")
- {
- this.update_list.Add(wd_NurseCfgInfo);
- }
- if (subitems[0].ToLower() == "d")
- {
- this.delete_list.Add(wd_NurseCfgInfo);
- }
- }
- }
- }
- }
|