예제 #1
0
 public void AddForm(MessagesEntity moduleEntity)
 {
     if (!new WebSiteApp().IsMessage(moduleEntity.WebSiteId))
     {
         throw new Exception("本网站留言功能未开启!");
     }
     VerityTime(moduleEntity);
     moduleEntity.EnabledMark = true;
     moduleEntity.Create();
     service.Insert(moduleEntity);
 }
예제 #2
0
 public void SubmitForm(MessagesEntity moduleEntity, string keyValue)
 {
     if (!string.IsNullOrEmpty(keyValue))
     {
         moduleEntity.Modify(keyValue);
         service.Update(moduleEntity);
         //添加日志
         LogHelp.logHelp.WriteDbLog(true, "修改留言信息=>" + moduleEntity.UserName, Enums.DbLogType.Update, "留言管理");
     }
     else
     {
         moduleEntity.EnabledMark = true;
         moduleEntity.Create();
         service.Insert(moduleEntity);
         //添加日志
         LogHelp.logHelp.WriteDbLog(true, "添加留言信息=>" + moduleEntity.UserName, Enums.DbLogType.Create, "留言管理");
     }
 }