public APIReturn Delete_delete(uint?Id) { int affrows = Sysdoc.Delete(Id); if (affrows > 0) { return(new APIReturn(0, string.Format("删除成功,影响行数:{0}", affrows))); } return(new APIReturn(99, "失败")); }
public APIReturn Post_insert([FromForm] string Content, [FromForm] string Title) { SysdocInfo item = new SysdocInfo(); item.Content = Content; item.Create_time = DateTime.Now; item.Title = Title; item = Sysdoc.Insert(item); return(new APIReturn(0, "成功", "item", item.ToBson())); }
public APIReturn Get_item(uint?Id) { SysdocInfo item = Sysdoc.GetItem(Id); if (item == null) { return(new APIReturn(98, "记录不存在,或者没有权限")); } return(new APIReturn(0, "成功", "item", item.ToBson())); }
public APIReturn Put_update(uint?Id, [FromForm] string Content, [FromForm] string Title) { SysdocInfo item = new SysdocInfo(); item.Id = Id; item.Content = Content; item.Create_time = DateTime.Now; item.Title = Title; int affrows = Sysdoc.Update(item); if (affrows > 0) { return(new APIReturn(0, "成功")); } return(new APIReturn(99, "失败")); }
public ViewResult 关于页() { ViewBag.doc = Sysdoc.GetItem(3); ViewBag.fls = Friendlylinks.Select.OrderBy("sort desc").Skip(4).Limit(20).ToList(60 * 30, "about_fls"); return(View("sysdoc")); }
public ViewResult API页() { ViewBag.doc = Sysdoc.GetItem(2); return(View("sysdoc")); }
public ViewResult 新手入门页() { ViewBag.doc = Sysdoc.GetItem(1); return(View("sysdoc")); }