Esempio n. 1
0
        public static void SendNotification(Ticket ticket, string Details)
        {
            db = new ApplicationDbContext();
            var user = db.Users.FirstOrDefault(p => p.Id == ticket.AssignId);
            var personalEmailService = new PersonalEmailService();
            var mailMessage          = new MailMessage(WebConfigurationManager.AppSettings["emailto"], user.Email);

            mailMessage.IsBodyHtml = true;

            switch (Details)
            {
            case "Comment":
                mailMessage.Body    = "Your '" + ticket.TicketProject.Name + "' ticket Has a new comment added by other user";
                mailMessage.Subject = "Tickets Comment";
                break;

            case "Attechment":
                mailMessage.Body    = "Your '" + ticket.TicketProject.Name + "' Has a new Attechments added by other user";
                mailMessage.Subject = "Tickets Attechments";
                break;

            case "Assign":
                mailMessage.Body    = "You are assign to a new ticket '" + ticket.TicketProject.Name + "'";
                mailMessage.Subject = "Tickets Assign";
                break;

            case "Edit":
                mailMessage.Body    = "There is a new update on your '" + ticket.TicketProject.Name + "' ticket";
                mailMessage.Subject = "Tickets update";
                break;
            }
            personalEmailService.Send(mailMessage);
            TrackerHub.SendNotificationToUser(ticket.Assign.UserName, mailMessage.Body);
        }
Esempio n. 2
0
 void Start()
 {
     th                 = gameObject.GetComponent <TrackerHub>();
     mouseFinger        = new FingerStruct();
     mouseFinger.id     = 0;
     mouseFinger.pos    = new Vector2(0, 0);
     mouseFinger.action = 3;
 }
Esempio n. 3
0
        public async Task <ApiResponseBase> Sell([FromBody] ApiSellOrder model, [FromServices]  TrackerHub hub)
        {
            if (!ModelState.IsValid)
            {
                return(ModelState.ToApiBaseResponse());
            }

            var user = await GetCurrentUserAsync();

            await _houseRepo.SellOrderAsync(user?.Id, model).ConfigureAwait(false);

            return(new ApiResponseBase());
        }
Esempio n. 4
0
 public virtual void Start()
 {
     trackerHub  = GameObject.FindWithTag("TrackerHub").GetComponent <TrackerHub>();
     firebaseHub = GameObject.FindWithTag("TrackerHub").GetComponent <FirebaseHub>();
 }