Esempio n. 1
0
        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;
        }
Esempio n. 2
0
 public TenantController(UserTable userTable, UserManager <User> userMgr, ProjectTable projectTable, NotificationTable notificationTable)
 {
     _userTable         = userTable;
     _userMgr           = userMgr;
     _projectTable      = projectTable;
     _notificationTable = notificationTable;
 }
Esempio n. 3
0
 public NotificationController(ServiceOrderTable serviceOrderTable, TenantTable tenantTable, UserTable userTable, NotificationTable notificationTable, ProjectTable projectTable)
 {
     _serviceOrderTable = serviceOrderTable;
     _tenantTable       = tenantTable;
     _userTable         = userTable;
     _notificationTable = notificationTable;
     _projectTable      = projectTable;
 }
Esempio n. 4
0
 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));
     }
 }
Esempio n. 5
0
        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);
        }
Esempio n. 6
0
        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());
        }
Esempio n. 8
0
        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();
                }
            }
        }
Esempio n. 9
0
 private void POST_Delete_Notification()
 {
     NotificationTable.DeleteNotification(long.Parse(Request.Form["NotificationID"]));
 }
Esempio n. 10
0
 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);
 }
Esempio n. 11
0
 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);
 }
Esempio n. 12
0
 public void Clear(int workshopId)
 {
     NotificationTable.Clear(workshopId);
 }
Esempio n. 13
0
 public List <NotificationOption> GetSelected()
 {
     return(NotificationTable.GetSelected());
 }
Esempio n. 14
0
 public List <NotificationOption> GetNotifications(bool isWorkshop)
 {
     return(NotificationTable.GetAll(isWorkshop));
 }
Esempio n. 15
0
 public List <NotificationOption> GetNotifications(int bookingId, bool isWorkshop = true)
 {
     return((isWorkshop) ?
            NotificationTable.GetAllWorkshopNotifications(bookingId) :
            NotificationTable.GetAllSessionNotifications(bookingId));
 }
Esempio n. 16
0
 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());
        }