Example #1
0
 public async Task RunStopped(string reason, LiveStatistic liveStatistic)
 {
     await this.Clients.All.SendAsync(
         "OnRunStopped",
         reason,
         this.mapper.Map <LiveStatisticDto>(liveStatistic));
 }
Example #2
0
 private List<LiveStatistic> BindLive()
 {
     List<DJ_DijiesheInfo> ListRecord = bllrecord.SelectFromRecord("", txtEntName.Text.Trim(), "", txtTime.Text, Master.CurrentTE.Id);
     List<LiveStatistic> ListLive = new List<LiveStatistic>();
     int Index = 1;
     foreach (var djs in ListRecord)
     {
         LiveStatistic LiveStatistic = new LiveStatistic();
         LiveStatistic.Index = Index++;
         LiveStatistic.EntName = djs.Name;
         LiveStatistic.djsId = djs.Id.ToString();
         foreach (var item in bllrecord.GetRecordByAllCondition("", djs.Name, DateTime.Parse(txtTime.Text).ToString(), DateTime.Parse(txtTime.Text).AddMonths(1).ToString(), Master.CurrentTE.Id))
         {
             LiveStatistic.RoomCount_Month += item.RoomNum;
             LiveStatistic.AppendBed_Month += item.AppendBed;
             LiveStatistic.LiveCount_Month += item.LiveDay;
         }
         foreach (var item in bllrecord.GetRecordByAllCondition("", djs.Name, (DateTime.Parse(txtTime.Text).Year.ToString()) + "-01-01", DateTime.Parse(txtTime.Text).AddMonths(1).ToString(), Master.CurrentTE.Id))
         {
             LiveStatistic.RoomCount_Year += item.RoomNum;
             LiveStatistic.AppendBed_Year += item.AppendBed;
             LiveStatistic.LiveCount_Year += item.LiveDay;
         }
         ListLive.Add(LiveStatistic);
     }
     return ListLive;
 }
Example #3
0
 public async Task CurrentRunChange(LiveStatistic liveStatistic)
 {
     await this.Clients.All.SendAsync(
         "OnCurrentRunChange",
         this.mapper.Map <LiveStatisticDto>(liveStatistic));
 }
Example #4
0
 public async Task RunUpdate(LiveStatistic liveStatistic)
 {
     await this.Clients.All.SendAsync(
         "OnRunUpdate",
         this.mapper.Map <LiveStatisticDto>(liveStatistic));
 }