Beispiel #1
0
        public ActionResult Delete(string id)
        {
            INotifyTypeDao dao = _notifyTypeDao;

            dao.Delete(dao.Get(id));
            return(Json(new { success = true }, JsonRequestBehavior.AllowGet));
        }
 /// <summary>
 /// </summary>
 /// <param name="dao"></param>
 /// <exception cref="ArgumentNullException">dao is null.</exception>
 public void Save(INotifyTypeDao dao)
 {
     if (dao == null)
         throw new ArgumentNullException("dao");
     NotifyType type = Id != null ? dao.Get(Id) : new NotifyType();
     type.Name = Name;
     type.Remark = Remark;
     type.CommunicationType = CommunicationType;
     dao.SaveOrUpdate(type);
     dao.Flush();
 }
        /// <summary>
        /// </summary>
        /// <param name="dao"></param>
        /// <exception cref="ArgumentNullException">dao is null.</exception>
        public void Save(INotifyTypeDao dao)
        {
            if (dao == null)
            {
                throw new ArgumentNullException("dao");
            }
            NotifyType type = Id != null?dao.Get(Id) : new NotifyType();

            type.Name              = Name;
            type.Remark            = Remark;
            type.CommunicationType = CommunicationType;
            dao.SaveOrUpdate(type);
            dao.Flush();
        }
 /// <summary>
 /// </summary>
 /// <param name="messageDao"></param>
 public NotifyTypeController(IMessageDaoFactory messageDao)
 {
     _notifyTypeDao = messageDao.NotifyTypeDao;
 }
Beispiel #5
0
 /// <summary>
 /// </summary>
 /// <param name="messageDao"></param>
 public NotifyTypeController(IMessageDaoFactory messageDao)
 {
     _notifyTypeDao = messageDao.NotifyTypeDao;
 }