コード例 #1
0
        public ActionResult Notices()
        {
            notice = new NoticesModel();
            notice.CommunityID = myCommunityID;
            ViewBag.NoticesList = noticesDAL.NoticesList(notice);

            if (TempData["NewNoticeID"] != null)
            {
                ViewBag.NewNoticeID = TempData["NewNoticeID"];
                Session.Remove("NewNoticeID");
            }

            return View("Notices");
        }
コード例 #2
0
 public PartialViewResult NoticesListTable()
 {
     notice = new NoticesModel();
     notice.CommunityID = myCommunityID;
     ViewBag.NoticesList = noticesDAL.NoticesList(notice);
     return PartialView("Partials/Notices/NoticesListTable");
 }
コード例 #3
0
 public ActionResult NewNotice(NoticesModel notice)
 {
     if (this.ModelState.IsValid)
     {
         notice.CreatedUserID = Convert.ToInt64(useMyCookie["UserID"].ToString());
         notice.CreatedOn = Convert.ToDateTime(DateTime.Now.ToShortDateString());
         return Json(noticesDAL.AddNotice(notice).ToString());
     }
     else
         return AjaxDataError("Notice");
 }
コード例 #4
0
        public ActionResult NoticeDetails(String noticeid)
        {
            if (NoticeIDSanctityCheck(noticeid))
            {
                notice = new NoticesModel();
                notice.NoticeID = Convert.ToInt64(noticeid);
                notice.CommunityID = myCommunityID;

                return PartialView("Partials/Notices/NoticeDetails", noticesDAL.NoticeDetails(notice));
            }
            else
                return AjaxParamError("Notice");
        }
コード例 #5
0
 public ActionResult DeleteNotice(String noticeid)
 {
     if (NoticeIDSanctityCheck(noticeid))
     {
         notice = new NoticesModel();
         notice.NoticeID = Int64.Parse(noticeid);
         notice.CommunityID = myCommunityID;
         notice.ModifiedUserID = Convert.ToInt64(useMyCookie["UserID"].ToString());
         notice.ModifiedRoleID = Convert.ToByte(useMyCookie["RoleID"].ToString());
         notice.ModifiedOn = Convert.ToDateTime(DateTime.Now.ToShortDateString());
         return Json(noticesDAL.DeleteNotice(notice));
     }
     else
         return AjaxParamError("Notice");
 }
コード例 #6
0
 public ActionResult NewNotice()
 {
     notice = new NoticesModel();
     notice.CommunityID = myCommunityID;
     return PartialView("Partials/Notices/NewNotice", notice);
 }
コード例 #7
0
        public ActionResult EditNotice(String noticeid, String communityid)
        {
            if (CommunityIDSanctityCheck(communityid))
            {
                if (NoticeIDSanctityCheck(noticeid))
                {
                    notice = new NoticesModel();
                    notice.NoticeID = Convert.ToInt64(noticeid);
                    notice.CommunityID = outCommunityID;

                    return PartialView("Partials/Notices/EditNotice", noticesDAL.EditNotice(notice));
                }
                else
                    return AjaxParamError("Notice");
            }
            else
                return AjaxParamError("Community");
        }
コード例 #8
0
        public PartialViewResult NoticesListTable(String communityid)
        {
            if (CommunityIDSanctityCheck(communityid))
            {
                notice = new NoticesModel();
                notice.CommunityID = outCommunityID;

                return PartialView("Partials/Notices/NoticesListTable", noticesDAL.NoticesList(notice));
            }
            else
                return null;
        }
コード例 #9
0
        public ActionResult NoticesList(String communityid)
        {
            if (CommunityIDSanctityCheck(communityid))
            {
                notice = new NoticesModel();
                notice.CommunityID = outCommunityID;

                if (TempData["NewNoticeID"] != null)
                {
                    ViewBag.NewNoticeID = TempData["NewNoticeID"];
                    Session.Remove("NewNoticeID");
                }

                return PartialView("Partials/Notices/NoticesList", noticesDAL.NoticesList(notice));
            }
            else
                return AjaxParamError("community");
        }
コード例 #10
0
 public ActionResult NewNotice(NoticesModel notice)
 {
     if (this.ModelState.IsValid)
     {
         notice.CreatedUserID = Convert.ToInt64(useMyCookie["UserID"].ToString());
         notice.CreatedRoleID = Convert.ToByte(useMyCookie["RoleID"].ToString());
         notice.CreatedOn = Convert.ToDateTime(DateTime.Now.ToShortDateString());
         return Json(noticesDAL.AddNotice(notice).ToString());
     }
     else
         return Json("dataerror", JsonRequestBehavior.AllowGet);
 }
コード例 #11
0
 public ActionResult NewNotice(String communityid)
 {
     if (CommunityIDSanctityCheck(communityid))
     {
         notice = new NoticesModel();
         notice.CommunityID = outCommunityID;
         return PartialView("Partials/Notices/NewNotice", notice);
     }
     else
         return AjaxParamError("Community");
 }