Exemplo n.º 1
0
        public void SendEmail(WorkOrder workOrder, string sendToEmailAddress, string workOrderDescription)
        {
            var email = new EMail();

            email.CreateDateTime = DateTime.Now;
            email.ToEmailAddress = sendToEmailAddress;
            email.Subject        = $"{workOrder.Subject} - Work Order # {workOrder.Id} Created";
            email.Body           = $"Work Order #{workOrder.Id} has been created per your request." + $"\n\r\n\rStatus: NEW";
            email.Body           = email.Body + "\n\r\n\r\n\rAssigned To: Not Currently Assigned";

            email.Body = email.Body + "\n\rLocation: " + "No Location Provided";
            email.Body = email.Body + $"\n\r\n\r\n\r\n\rCategory: Uncategorized\n\r\n\r\n\rSubject: {workOrder.Subject}";
            email.Body = email.Body + $"\n\r\n\r\n\r{workOrderDescription}";
            email.Sent = false;

            _context.EMails.InsertOnSubmit(email);
            _context.SubmitChanges();
        }
Exemplo n.º 2
0
 private void detach_WorkOrders1(WorkOrder entity)
 {
     this.SendPropertyChanging();
     entity.AppUser1 = null;
 }
Exemplo n.º 3
0
 private void attach_WorkOrders(WorkOrder entity)
 {
     this.SendPropertyChanging();
     entity.AppUser = this;
 }
Exemplo n.º 4
0
 partial void DeleteWorkOrder(WorkOrder instance);
Exemplo n.º 5
0
 partial void UpdateWorkOrder(WorkOrder instance);
Exemplo n.º 6
0
 partial void InsertWorkOrder(WorkOrder instance);