Beispiel #1
0
        public JsonResult DeleteAttachment(int attachmentId)
        {
            Logger.Info(_logMsg.Clear().SetPrefixMsg("Delete Attachment").Add("AttachmentId", attachmentId).ToInputLogString());

            try
            {
                _customerFacade = new CustomerFacade();
                _customerFacade.DeleteCustomerAttachment(attachmentId, this.UserInfo.UserId);

                return(Json(new
                {
                    Valid = true
                }));
            }
            catch (Exception ex)
            {
                Logger.Error("Exception occur:\n", ex);
                Logger.Info(_logMsg.Clear().SetPrefixMsg("Delete Attachment").Add("Error Message", ex.Message).ToFailLogString());
                return(Json(new
                {
                    Valid = false,
                    Error = Resource.Error_System,
                    Errors = string.Empty
                }));
            }
        }