public PageEntry(Mobile sender, string message, PageType type) { m_Sender = sender; m_Sent = DateTime.UtcNow; m_Message = Utility.FixHtml(message); m_Type = type; m_PageLocation = sender.Location; m_PageMap = sender.Map; PlayerMobile pm = sender as PlayerMobile; if (pm != null && pm.SpeechLog != null && Array.IndexOf(SpeechLogAttachment, type) >= 0) { m_SpeechLog = new List <SpeechLogEntry>(pm.SpeechLog); } m_Timer = new InternalTimer(this); m_Timer.Start(); StaffHistory history = Reports.Reports.StaffHistory; if (history != null) { m_PageInfo = new PageInfo(this); history.AddPage(m_PageInfo); } }
public IActionResult EnterUser() { var getActionUser = _userService.getActionUser(); if (getActionUser != null) { return(Ok(new { Message = getActionUser.FirstName + " " + getActionUser.LastName + " is Active" })); } var lastRecord = _userService.getLastRecord(Int32.Parse(User.Identity.Name)); var EnterUser = new StaffHistory(); if (lastRecord != null) { EnterUser = _userService.Enter(Int32.Parse(User.Identity.Name), lastRecord.CountEnter + 1); } else { EnterUser = _userService.Enter(Int32.Parse(User.Identity.Name), 1); } return(Ok( new { Id = EnterUser.Id, UserId = EnterUser.UserId, Enter = EnterUser.EnterTime, Exit = EnterUser.ExitTime, CountEnter = EnterUser.CountEnter } )); }
public StaffHistory GetStaffHistoryOverview(WrapperStaffHistory list) { StaffHistory history = new StaffHistory(); for (int i = 0; i < list.ListOfData.Count; i++) { StaffHistory temp = list.ListOfData.ElementAt(i); if (temp.Type == "InvoiceItem") { // history.PaidAmount += temp.PaidAmount; // history.PayableAmount += temp.PayableAmount; } else if (temp.Type == "ProductionItem") { } else if (temp.Type == "ExpenseItem") { history.PaidAmount += temp.PaidAmount; } else if (temp.Type == "IncomeItem") { history.RecievedAmount += temp.RecievedAmount; } else if (temp.Type == "PayableItem") { history.PayableAmount += temp.PayableAmount; } else if (temp.Type == "RecievableItem") { history.RecievableAmount += temp.RecievableAmount; } } return(history); }
public StaffHistory Enter(int userId, int count) { StaffHistory history = new StaffHistory(); history.UserId = userId; history.EnterTime = DateTime.Now.ToString(); history.ExitTime = "waiting"; history.CountEnter = count; _context.StaffHistories.Add(history); _context.SaveChanges(); return(history); }