public JsonResult Deletes(long [] ids) { var result = new JsonResultModel { ResultState = Notifys.DeleteNotifys(ids) > 0 }; return(Json(result)); }
public JsonResult Delete(long id) { var result = new JsonResultModel { ResultState = Notifys.DeleteNotify(id) > 0 }; return(Json(result)); }
public ActionResult Index(int?page) { int pageIndex = page.HasValue ? page.Value : 1; int pageSize = PageConfig.BackstagePageSize; int count, pageCount; var result = Notifys.NotifyInfosToVModels(Notifys.GetNotifyPageList(pageIndex, pageSize, null, null, out pageCount, out count)); PagedList <NotifyVModel> pl = result.ToPagedList(pageIndex, pageSize); pl.TotalItemCount = count; pl.CurrentPageIndex = pageIndex; return(View(pl)); }
public JsonResult Add(NotifyVModel model) { var result = new JsonResultModel(); if (ModelState.IsValid) { //add result.ResultState = Notifys.AddNotify(Notifys.NotifyVModelToInfo(model)) > 0; } else { result.ResultState = false; result.Message = ModelStateHelper.GetAllErrorMessage(ModelState); } return(Json(result)); }
protected void Page_Init(object sender, EventArgs e) { notifications = new List<Notifys>(); NumUnread = 0; var nis = Lib.Data.NotificationInstance.FindNewForUser(Framework.Security.Manager.GetUser()); foreach (var ni in nis) { var t = new Notifys { notification = ni.Notification, read = ni.Read.HasValue }; if (!t.read) NumUnread++; notifications.Add(t); } }
public ActionResult Edit(int id) { var model = Notifys.NotifyInfoToVModel(Notifys.GetNotifyInfo(id)); return(View(model)); }
void Start() { dataPath = DataRader.GetPath() + "com." + Application.companyName + "." + Application.productName + "." + Notication.GetType().ToString() + ""; Notication = DataRader.Load <Notifys>(dataPath); }