コード例 #1
0
        public ActionResult Create()
        {
            //Get the list category
            var TypeNotify = new TypeNotify();

            return(View(TypeNotify));
        }
コード例 #2
0
 public ActionResult Edit(TypeNotify TypeNotifytoedit)
 {
     if (ModelState.IsValid)
     {
         //Mapping to domain
         _TypeNotifyService.EditTypeNotify(TypeNotifytoedit);
         return(RedirectToAction("Index", "TypeNotify"));
     }
     else
     {
         return(View("Edit", TypeNotifytoedit));
     }
 }
コード例 #3
0
    public void Open(string content, TypeNotify type)
    {
        if (string.IsNullOrEmpty(content))
        {
            return;
        }

        Notify().Show(new NotifyItemData
        {
            type    = type,
            content = content
        });
    }
コード例 #4
0
 public ActionResult Create(TypeNotify newTypeNotify)
 {
     if (ModelState.IsValid)
     {
         newTypeNotify.IsDelete = false;
         //Mapping to domain
         //Create Blog
         _TypeNotifyService.CreateTypeNotify(newTypeNotify);
         return(RedirectToAction("Index", "TypeNotify"));
     }
     else
     {
         return(View("Create", newTypeNotify));
     }
 }
コード例 #5
0
        public ActionResult Message(string name, string email, string message, string phone)
        {
            string message2 = "<strong>Tên:</strong> " + name + " <br /><strong>Phone:</strong> " + phone + " <br /><strong>email:</strong> " + email + " <br /> Nội dung: " + message;

            sendMail.SendEmail("*****@*****.**", "Học viên Liên Hệ", message2);
            TypeNotify item = new TypeNotify();

            item.Name        = name;
            item.Description = email;
            item.Note        = message;
            item.Phone       = phone;
            item.IsDelete    = false;
            _typeNotifyService.CreateTypeNotify(item);
            return(RedirectToAction("Index", "Home"));
        }