예제 #1
0
        public ActionResult EditNote(AssociationNoteEditModel Note)
        {
            Association association = reposetory.GetAssociation(Note.AssociationID);

            if (ModelState.IsValid)
            {

                association.Comments = "<hr><strong><i class=\"ace-icon fa fa-clock-o bigger-110\"></i> " + DateTime.Now.ToShortDateString() + " " + CurrentProfile.Username + "</strong>: " +
                Note.NewNote + "<hr />" + association.Comments;

                if (reposetory.Save(association))
                {
                    ViewBag.FormSucces = true;
                    ModelState.Clear();
                    Note.Note = association.Comments;
                    Notification not = reposetory.Notify(Note, String.Format(Notifications.AssociationNewNote, association.Name));
                    reposetory.NotifyAddAdministration(not);
                    reposetory.NotifySave(not);
                }
                else
                {
                    ViewBag.HandledException = true;
                }

            }

            return View(Note);
        }
예제 #2
0
        public ActionResult EditNote(Guid Id)
        {
            Association association = reposetory.GetAssociation(Id);

            AssociationNoteEditModel Note = new AssociationNoteEditModel
            {
                Note = association.Comments,
                AssociationID = association.AssociationID
            };

            return View(Note);
        }