Example #1
0
        public void NotifyTenantOrderComplete(MaintenanceOrder order)
        {
            var    tenant  = GetTenantFromUnitId(order.UnitId);
            string message = $"Dear, {tenant.FirstName} {tenant.LastName} your work order titled: {order.Name} has been completed";

            TwilioNotification.TwilioMessage(tenant.PhoneNumber, message);
        }
Example #2
0
        public ActionResult WorkOrderMessage(string phoneNumber, int UnitId)
        {
            string messageText = $"A maintenance report has been submitted for unit number: {UnitId}";

            TwilioNotification.TwilioMessage(phoneNumber, messageText);
            return(View());
        }
        //VERY MVP, NEEDS A LOT MORE USER INPUT OPTIONS. WANT TO ADD PARTIAL VIEW
        public ActionResult LateRentMessage(string phoneNumber, int balance)
        {
            string messageText = $"Your past due rent balance is: {balance}. Please remit payment at your earliest convenience";

            TwilioNotification.TwilioMessage(phoneNumber, messageText);
            return(View());
        }
Example #4
0
        public ActionResult CheckIfRentDueDate(int?id)
        {
            var tenant       = db.Tenants.Find(id);
            int dueDate      = 5; //TEMP!! NEED TO GRAB THIS FROM TENANT.DUEDATE
            int reminderDate = 1;

            if (DateTime.Now.Day == reminderDate)
            {
                string message = $"Dear, {tenant.FirstName} {tenant.LastName} your rent payment of {tenant.HousingUnit.MonthlyRent} is due on the 5th. Thank you";
                TwilioNotification.TwilioMessage(message, tenant.PhoneNumber);
            }

            else if (dueDate == DateTime.Now.Day)
            {
                ChargeRentBalance(tenant);
            }

            return(RedirectToAction(""));
        }