public HomeController(ILogger <HomeController> logger, Helper helper, UserTable ut, TenantTable tt, UserManager <User> userManager, SignInManager <User> signInManager, UserManager <GlobalUser> sharedUserManager, SignInManager <GlobalUser> sharedSignInManager, NewTenantProcedure newTenant, IAuthorizationService auth, ServiceOrderTable serviceOrderTable, NotificationTable notificationTable, TaskTable taskTable) { _logger = logger; _helper = helper; _ut = ut; _tt = tt; _serviceOrderTable = serviceOrderTable; _newTenant = newTenant; UserMgr = userManager; SignInMgr = signInManager; SharedUserMgr = sharedUserManager; SharedSignInMgr = sharedSignInManager; _authorization = auth; _notificationTable = notificationTable; _taskTable = taskTable; }
public TenantController(UserTable userTable, UserManager <User> userMgr, ProjectTable projectTable, NotificationTable notificationTable) { _userTable = userTable; _userMgr = userMgr; _projectTable = projectTable; _notificationTable = notificationTable; }
public NotificationController(ServiceOrderTable serviceOrderTable, TenantTable tenantTable, UserTable userTable, NotificationTable notificationTable, ProjectTable projectTable) { _serviceOrderTable = serviceOrderTable; _tenantTable = tenantTable; _userTable = userTable; _notificationTable = notificationTable; _projectTable = projectTable; }
internal void Changed(object sender, RecordChangedEventArgs <T> e) { if (ChangesSupport.Contains(e.ChangeType)) { Entity = e.Entity; JsonEntity = JsonConvert.SerializeObject(Entity); JsonObject = JObject.Parse(JsonEntity); NotificationTable?.NotificationTable(e.Entity, ConvertType(e.ChangeType)); } }
public bool AddNotificationTable(int notificationcode, string description, string roles, bool active) { NotificationTable notificationTable = new NotificationTable() { Notificationcode = notificationcode, Description = description, Active = active, Roles = roles }; if (!_session.QueryOver <NotificationTable>().Where(x => x.IsDeleted == false && x.Notificationcode == notificationcode).Any()) { _session.Transact(session => session.Save(notificationTable)); return(true); } return(false); }
private void POST_Create_Reservation() { //TO-DO fix validation for input fields if (!UserAgent.IsAuthenticated) { return; } if (UserAgent.Account.Contact.MissingData()) { return; } Reservation res = ReservationTable.CreateReservation(UserAgent.Account.Id, restaurant, DateTime.Parse(fromdate + " " + fromtime), DateTime.Parse(tilldate + " " + tilltime), guestsamount); NotificationTable.CreateNotification(UserAgent.Account.Id, AccountTable.RetrieveAccountByCompanyID(restaurant).Id, res.Id, 2); }
public IHttpActionResult SendPushNotification([FromBody] notification noti) { var DeviceTokenList = GetAllTokens(); pushnotification notification = new pushnotification(); notification.title = noti.notification_title; notification.body = noti.notification_text; NotificationTable table = new NotificationTable(); table.notification_image = noti.notification_image; table.notification_text = noti.notification_text; table.notification_title = noti.notification_title; table.notification_date = DateTime.Now; dbe.NotificationTable.Add(table); dbe.SaveChanges(); var Json = JsonConvert.SerializeObject(notification); SendNotification(DeviceTokenList, Json); return(Ok()); }
public void setNotificaitonAndMail(DOneTable dOneTable) { // yeni oluturulan ekip üyelerine mail ve bildirim gidecek // bildirim gitmesi: // ekip liderine gidecek mail var userTable = db.UserTable.Where(x => x.Name == dOneTable.TeamLeader).FirstOrDefault(); NotificationTable notification = new NotificationTable(); notification.Date = DateTime.Now; notification.MailAddress = userTable.Email; notification.Notification = dOneTable.ErrorNo + " nol'lu hatanın çözüm ekibi Liderisiniz"; notification.IsRead = null; notification.ErrorNo = dOneTable.ErrorNo; db.NotificationTable.Add(notification); db.SaveChanges(); // ekip üyelerine gidecek mail var teamMembers = dOneTable.TeamMembers.Split(',').ToList(); foreach (var member in teamMembers) { if (member != null) { userTable = db.UserTable.Where(x => x.Name == member).FirstOrDefault(); notification = new NotificationTable(); notification.Date = DateTime.Now; notification.MailAddress = userTable.Email; notification.Notification = dOneTable.ErrorNo + " nol'lu hatanın çözüm ekibine atandınız"; notification.IsRead = null; notification.ErrorNo = dOneTable.ErrorNo; db.NotificationTable.Add(notification); db.SaveChanges(); } } }
private void POST_Delete_Notification() { NotificationTable.DeleteNotification(long.Parse(Request.Form["NotificationID"])); }
private void POST_Confirm_Reservation() { ReservationTable.UpdateReservationStatus(long.Parse(Request.Form["ResID"]), ReservationStatus.ACCEPTED); NotificationTable.CreateNotification(UserAgent.Account.Id, long.Parse(Request.Form["CustomerID"]), long.Parse(Request.Form["ResID"]), 1); }
private void POST_Decline_Reservation() { ReservationTable.UpdateReservationStatus(long.Parse(Request.Form["ResID"]), ReservationStatus.DECLINED); NotificationTable.CreateNotification(UserAgent.Account.Id, long.Parse(Request.Form["CustomerIDCancel"]), long.Parse(Request.Form["ResIDCancel"]), 0); }
public void Clear(int workshopId) { NotificationTable.Clear(workshopId); }
public List <NotificationOption> GetSelected() { return(NotificationTable.GetSelected()); }
public List <NotificationOption> GetNotifications(bool isWorkshop) { return(NotificationTable.GetAll(isWorkshop)); }
public List <NotificationOption> GetNotifications(int bookingId, bool isWorkshop = true) { return((isWorkshop) ? NotificationTable.GetAllWorkshopNotifications(bookingId) : NotificationTable.GetAllSessionNotifications(bookingId)); }
public void StoreNotifications(int id, DateTime sessionDate, List <NotificationOption> notifications) { NotificationTable.InsertAll(notifications, id, sessionDate); }
public void SendNotification(ProgressState request) { var notifications = new NotificationTable(); notifications.AddNotificationToTable(request); }
public IEnumerable <NotificationEntity> GetAllNotifications() { var notifications = new NotificationTable(); return(notifications.GetAllActionProcesCloudServices()); }