123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102 |
- 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_StaffInfoBusinessLogic : BusinessLogicBase2<WD_StaffInfo>
- {
- private string id = string.Empty;
- public WD_StaffInfoBusinessLogic(string id)
- : base()
- {
- this.id = id;
- }
- public WD_StaffInfoExt QueryAll()
- {
- this.wd_StaffInfoDataAccess.QueryAll();
- return this.wd_StaffInfoDataAccess.ext;
- }
- public override ModelExtBase<WD_StaffInfo> Query(string patientid)
- {
- this.wd_StaffInfoDataAccess.QueryAll();
- this.wd_StaffInfoDataAccess.ext.messageDataList = this.wd_StaffInfoDataAccess.ext.messageDataList.FindAll(f => f.ID == this.id).ToList();
- return this.wd_StaffInfoDataAccess.ext;
- }
- public override ModelBase Business(string data)
- {
- base.Business(data);
- this.wd_StaffInfoDataAccess.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_StaffInfo wd_StaffInfo = new WD_StaffInfo()
- {
- ID = subitems[1],
- STAFF_ID = subitems[2],
- STAFF_PASSWORDCARD = subitems[3],
- STAFF_NAME = subitems[4],
- STAFF_NAME_PY = subitems[5],
- STAFF_TYPE = subitems[6],
- STAFF_SEX = subitems[7],
- STAFF_BIRTHDAY = subitems[8],
- STAFF_IDCARD = subitems[9],
- STAFF_WORKDATE = subitems[10],
- STAFF_PICTURE = subitems[11],
- STAFF_WORKTEL = subitems[12],
- STAFF_MOBILE = subitems[13],
- STAFF_CONTENT = subitems[14],
- STAFF_DUTY = subitems[15],
- STAFF_DATETIME = subitems[16],
- };
- if(subitems[0].ToLower() == "i")
- {
- this.insert_list.Add(wd_StaffInfo);
- }
- if (subitems[0].ToLower() == "u")
- {
- this.update_list.Add(wd_StaffInfo);
- }
- if (subitems[0].ToLower() == "d")
- {
- this.delete_list.Add(wd_StaffInfo);
- }
- }
- }
- }
- }
|