public JsonResult Add(SendMailLogVModel model)
        {
            var result = new JsonResultModel();

            if (ModelState.IsValid)
            {
                //add
                result.ResultState = SendMailLogs.AddSendMailLog(SendMailLogs.SendMailLogVModelToInfo(model)) > 0;
            }
            else
            {
                result.ResultState = false;
                result.Message     = ModelStateHelper.GetAllErrorMessage(ModelState);
            }

            return(Json(result));
        }
Example #2
0
 /// <summary>
 /// 写入邮件发送日志
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public long Add(SendMailLogVModel model)
 {
     return(SendMailLogs.AddSendMailLog(SendMailLogs.SendMailLogVModelToInfo(model)));
 }