Exemple #1
0
        public IActionResult Save(PersonAntiSocialBehaviourCaseNoteDto model)
        {
            bool success;
            var  time = model.ActionDate.ToShortDateString().Substring(0, 10) + " " + model.ActionTime + ":00";
            var  date = DateTime.Parse(time);

            model.ActionDateTime = date;
            model = model.Id == 0 ? _customerFacadeApiClient.PostPersonAntiSocialBehaviourCaseNote(model).Result
                : _customerFacadeApiClient.PutPersonAntiSocialBehaviourCaseNote(model.Id, model).Result;
            success = string.IsNullOrWhiteSpace(model.ErrorMessage);
            return(Json(new { success, message = success ? model.SuccessMessage : model.ErrorMessage }));
        }