public void InsertServiceRequest(ServiceRequest entity)
        {
            if (entity == null)
                throw new ArgumentNullException("ServiceRequest");

            _serviceRequestRepository.Insert(entity);
        }
Exemplo n.º 2
0
        public JsonResult SendNewServiewRequest(NewServiceRequestModel model)
        {
            if (ModelState.IsValid)
            {
                ServiceRequest entity = new ServiceRequest();
                entity.CreatedOnUtc = DateTime.UtcNow;
                entity.EmailAddress = model.ServiceEmailAdddress;
                entity.Zipcode = model.ServiceZipCode;

                _serviceRequestService.InsertServiceRequest(entity);

                //_workflowMessageService.SendNewServiceRequestSiteOwnerNotification(model.ServiceEmailAdddress, model.ServiceZipCode);
                model.Result = true;

            }
            else
            {
                model.Result = false;
                model.Message = "Somthing Wrong.";
            }

            //return songList;
            return Json(model, JsonRequestBehavior.AllowGet);
        }