public ActionResult <VAttachmentAddResModel> VA_SubmitImg(VA_HandleImgAddModel AddViewModel) { int Add_Count = 0; VAttachmentAddResModel AddResModel = new VAttachmentAddResModel(); Add_Count = _VolunteerActivityService.SubmitImg(AddViewModel); if (Add_Count == 8) { AddResModel.IsSuccess = false; AddResModel.AddCount = 0; AddResModel.baseViewModel.Message = "请上传现场图片"; AddResModel.baseViewModel.ResponseCode = 800; } if (Add_Count == 9) { AddResModel.IsSuccess = false; AddResModel.AddCount = 0; AddResModel.baseViewModel.Message = "您还未进行注册请先注册"; AddResModel.baseViewModel.ResponseCode = 700; } else { AddResModel.IsSuccess = true; AddResModel.AddCount = Add_Count; AddResModel.baseViewModel.Message = "上传成功"; AddResModel.baseViewModel.ResponseCode = 200; } return(Ok(AddResModel)); }
public ActionResult <VAttachmentAddResModel> VAttachment_add(VAttachmentAddViewModel AddViewModel) { int Add_Count; VAttachmentAddResModel AddResModel = new VAttachmentAddResModel(); Add_Count = _IVAttachmentService.VAttachment_Add(AddViewModel); if (Add_Count > 0) { AddResModel.IsSuccess = true; AddResModel.AddCount = Add_Count; AddResModel.baseViewModel.Message = "添加成功"; AddResModel.baseViewModel.ResponseCode = 200; return(Ok(AddResModel)); } else { AddResModel.IsSuccess = false; AddResModel.AddCount = 0; AddResModel.baseViewModel.Message = "添加失败"; AddResModel.baseViewModel.ResponseCode = 200; return(Ok(AddResModel)); } }