zoukankan      html  css  js  c++  java
  • 控制七

    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; } } } }
  • 相关阅读:
    经典排序之 计数排序
    经典算法 总结
    经典排序之 二路归并排序
    经典排序之 堆排序
    经典排序之 插入排序
    经典排序之 冒泡排序
    经典排序之 选择排序
    经典排序之 快速排序
    两个队列实现一个栈
    Java Web系列:JDBC 基础
  • 原文地址:https://www.cnblogs.com/zongmf/p/10003256.html
Copyright © 2011-2022 走看看