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从基础知识(九)I/O
    c++学习笔记(2)类的声名与实现的分离及内联函数
    转:给C++初学者的50个忠告
    c++学习(1)
    vim下缩进及高亮设置
    转载:c++ sort用法
    菜鸟成长记1,软件工程大一经历
    linux下挂载另一系统硬盘。
    OpenCV VideoCapture.get()参数详解
    opencv+python 添加文字 cv2.putText
  • 原文地址:https://www.cnblogs.com/zongmf/p/10003256.html
Copyright © 2011-2022 走看看