123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Web;
- using System.Web.UI;
- using System.Web.UI.WebControls;
- using HNWD.Pregrant.Model;
- using HNWD.Pregrant.Common;
- using System.Text;
- using HNWD.Pregrant.DataAccess;
- using HNWD.Pregrant.WebService;
- namespace HNWD.Pregrant.WebService.WDHS_I
- {
- /// <summary>
- /// 广播数据
- /// </summary>
- public partial class callingMainNurse_BroadcastInfo : PageBase
- {
- /// <summary>
- /// PartitionNo
- /// ID=37 ,
- /// IsOpen=1
- /// PartitionNo=""
- /// ID=37&IsOpen=1
- /// </summary>
- protected void Page_Load(object sender, EventArgs e)
- {
- string PartitionNo = this.GetValueByKey("PartitionNo");
- string ID = this.GetValueByKey("ID");
- string IsOpen = this.GetValueByKey("IsOpen");
- int Pages = Convert.ToInt32(string.IsNullOrEmpty(this.GetValueByKey("Page"))?"-1": this.GetValueByKey("Page"));
- int PageSize = Convert.ToInt32(string.IsNullOrEmpty(this.GetValueByKey("PageSize"))?"8" : this.GetValueByKey("PageSize"));
-
- WD_ZoneInfoDataAccess wd = new WD_ZoneInfoDataAccess(new WD_ZoneInfo() { ZONE_STATUS = IsOpen, ID = ID });
- if( !string.IsNullOrEmpty(ID))
- {
- if(string.IsNullOrEmpty(IsOpen))
- {
- this.ResponseDefaultError();
- return;
- }
- else
- {
-
- wd.UpdateZoneStatus();
- if(!wd.bSuccess)
- {
- this.ResponseDefaultError();
- return ;
- }
-
- }
- }
-
- wd.Query(PartitionNo);
- if(!wd.ext.bSuccess || wd.ext.Rows == 0)
- {
- this.ResponseDefaultError();
- return;
- }
- MusicFileExt musicFileext = new MusicFileExt();
- musicFileext.bSuccess = wd.ext.bSuccess;
- musicFileext.Message = wd.ext.Message;
- musicFileext.Code = wd.ext.Code;
-
- foreach(WD_ZoneInfo zoneInfo in wd.ext.messageDataList)
- {
- MusicFile musicInfo = new MusicFile();
- if (Pages == -1)
- {
- musicInfo.FileName = zoneInfo.ZONE_FILELIST;
- }
- else
- {
- foreach (string str in zoneInfo.ZONE_FILELIST.Split(new char[] { ',' }).ToList().Skip(Pages * PageSize).Take(PageSize).ToList())
- {
- musicInfo.FileName = musicInfo.FileName + "," + str ;
- }
- if(musicInfo.FileName.Length > 0)
- {
- musicInfo.FileName = musicInfo.FileName.Substring(1);
- }
- }
- musicInfo.PartitionNo = zoneInfo.ZONE_ZONEID;
- musicInfo.IsChecked = "false";
- musicInfo.Status = zoneInfo.ZONE_STATUS;
- musicInfo.Remarks = zoneInfo.ZONE_CONTENT;
- musicInfo.Weeks = zoneInfo.ZONE_WEEK;
- musicInfo.StartTime = zoneInfo.ZONE_STARTTIME;
- musicInfo.EndTime = zoneInfo.ZONE_ENDTIME;
- musicInfo.ID = zoneInfo.ID;
- musicFileext.FileList.Add(musicInfo);
- }
- Response.Write(JsonHelper.SerializeWithSuffix(musicFileext));
- }
- }
- }
|