• 控制七


    namespace 考勤项目.Controllers { public class clockingController : Controller { bllexam bll = new bllexam(); // GET: clocking [HttpPost] public int add(exam model) { return bll.add(model); } public ActionResult Index() { return View(); } //mvc接收显示方法 // JsonResult n = Json(bll.select().ToList(), JsonRequestBehavior.AllowGet); const int pageindex = 3; [HttpGet] public JsonResult getselect( string begintime, string endtime ,int page = 1) { //JsonResult n = Json(bll.select().ToList(), JsonRequestBehavior.AllowGet); List n = bll.select(); if (!string.IsNullOrWhiteSpace(begintime)) { var t = n.Where(m => m.begintime.Contains(begintime)).ToList(); } if (!string.IsNullOrWhiteSpace(endtime)) { var t = n.Where(m => m.begintime.Contains(endtime)).ToList(); } Page p = new Page(); p.pages = page; p.pagecount = (n.Count / pageindex) + (n.Count % pageindex == 0 ? 0 : 1); p.data = n.Skip((page - 1) * pageindex).Take(pageindex).ToList(); return Json(p, JsonRequestBehavior.AllowGet); } public ActionResult Show() { return View(); } public ActionResult manage() { return View(); } [HttpPost] public int SignIn(string time1) { string times = ConfigurationManager.AppSettings["Up"].ToString(); if (DateTime.Parse(time1) > DateTime.Parse(times)) { return 0; } else { return 1; } } [HttpPost] public int SignOut(string time2) { string times = ConfigurationManager.AppSettings["Down"].ToString(); if (DateTime.Parse(time2) < DateTime.Parse(times)) { return 0; } else { return 1; } } } }
  • 相关阅读:
    wordpress 的主题
    yapi api协作管理平台
    美团外卖券小程序路径过长导致插入文本消息失败的问题解决办法
    mp://XzDiXafjfvLnjvp
    supervisor 命令
    YII beego gin 框架对比
    芝麻微客-企业微信公域到私域流量运营助手
    H5跳转小程序
    PowerBI开发 第十九篇:基于Page创建Tooltip
    PowerBI开发 第十八篇:行级安全(RLS)
  • 原文地址:https://www.cnblogs.com/zongmf/p/10003256.html
Copyright © 2020-2023  润新知