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");
        }
 public PartialViewResult NoticesListTable()
 {
     notice = new NoticesModel();
     notice.CommunityID = myCommunityID;
     ViewBag.NoticesList = noticesDAL.NoticesList(notice);
     return PartialView("Partials/Notices/NoticesListTable");
 }
 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");
 }
        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");
        }
 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");
 }
 public ActionResult NewNotice()
 {
     notice = new NoticesModel();
     notice.CommunityID = myCommunityID;
     return PartialView("Partials/Notices/NewNotice", notice);
 }
        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");
        }
        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;
        }
        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");
        }
 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);
 }
 public ActionResult NewNotice(String communityid)
 {
     if (CommunityIDSanctityCheck(communityid))
     {
         notice = new NoticesModel();
         notice.CommunityID = outCommunityID;
         return PartialView("Partials/Notices/NewNotice", notice);
     }
     else
         return AjaxParamError("Community");
 }