|
- using System;
- using Learun.Util;
- using System.Data;
- using Learun.Application.TwoDevelopment.EducationalAdministration;
- using System.Web.Mvc;
- using System.Collections.Generic;
- using System.Linq;
- using Learun.Application.Organization;
-
- namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
- {
- /// <summary>
- /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
- /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
- /// 创 建:超级管理员
- /// 日 期:2021-12-16 10:14
- /// 描 述:长阳迎新
- /// </summary>
- public class StuVolunteerPhoneController : MvcControllerBaseNoLogin
- {
- private StuVolunteerIBLL stuVolunteerIBLL = new StuVolunteerBLL();
-
- #region 视图功能
- /// <summary>
- /// 生成二维码
- /// <summary>
- /// <returns></returns>
- [HttpGet]
- public ActionResult QRCode()
- {
- return View();
- }
-
- /// <summary>
- /// 生成二维码
- /// <summary>
- /// <returns></returns>
- [HttpGet]
- public ActionResult Link()
- {
- return View();
- }
-
- /// <summary>
- /// 报名
- /// <summary>
- /// <returns></returns>
- [HttpGet]
- public ActionResult FormApply()
- {
- return View();
- }
-
- /// <summary>
- /// 查询报名
- /// <summary>
- /// <returns></returns>
- [HttpGet]
- public ActionResult Search()
- {
- return View();
- }
-
-
- /// <summary>
- /// 查询报名
- /// <summary>
- /// <returns></returns>
- [HttpGet]
- public ActionResult SearchResult()
- {
- return View();
- }
-
- #endregion
-
- #region 获取数据
-
- /// <summary>
- /// 获取页面显示列表数据
- /// </summary>
- /// <param name="pagination">分页参数</param>
- /// <param name="queryJson">查询参数</param>
- /// <returns></returns>
- [HttpGet]
- [AjaxOnly]
- public ActionResult GetPageList(string pagination, string queryJson)
- {
- Pagination paginationobj = pagination.ToObject<Pagination>();
- var data = stuVolunteerIBLL.GetPageList(paginationobj, queryJson);
- var jsonData = new
- {
- rows = data,
- total = paginationobj.total,
- page = paginationobj.page,
- records = paginationobj.records
- };
- return Success(jsonData);
- }
- /// <summary>
- /// 获取表单数据
- /// </summary>
- /// <param name="keyValue">主键</param>
- /// <returns></returns>
- [HttpGet]
- [AjaxOnly]
- public ActionResult GetFormData(string keyValue)
- {
- var StuVolunteerData = stuVolunteerIBLL.GetStuVolunteerEntity(keyValue);
- var jsonData = new
- {
- StuVolunteer = StuVolunteerData,
- };
- return Success(jsonData);
- }
- #endregion
-
- #region 提交数据
-
- #endregion
-
-
- #region 扩展数据
-
- /// <summary>
- /// 登录查询
- /// </summary>
- /// <returns></returns>
- [HttpPost]
- [AjaxOnly]
- public ActionResult IsExist(string CardNo, string Password)
- {
- var entity = stuVolunteerIBLL.GetEntityByCardNo(CardNo);
- if (entity == null)
- {
- return Fail("身份证号不存在!");
- }
- if (Password != CardNo.Substring(CardNo.Length - 6))
- {
- return Fail("密码错误!");
- }
- return Success("查询成功!");
- }
-
- /// <summary>
- /// 报名提交
- /// </summary>
- /// <param name="keyValue"></param>
- /// <param name="strEntity"></param>
- /// <returns></returns>
- [HttpPost]
- [AjaxOnly]
- public ActionResult SubmitForm(string keyValue, string strEntity)
- {
- StuVolunteerEntity entity = strEntity.ToObject<StuVolunteerEntity>();
- entity.EnrollTime = DateTime.Now;
- stuVolunteerIBLL.SubmitForm(keyValue, entity);
- return Success("提交成功!");
- }
-
-
- //public ActionResult Search(string CardNo, string txtPass)
- //{
- // var StuVolunteerData = new StuVolunteerEntity();// stuVolunteerIBLL.IsEnrollByCard(CardNo);
- // if (StuVolunteerData != null)
- // {
- // var jsonData = new
- // {
- // StuVolunteer = StuVolunteerData,
- // };
- // return Success(jsonData);
- // }
- // else
- // {
- // return Success(null);
- // }
- //}
- [HttpGet]
- [AjaxOnly]
- public ActionResult SearchForm(string CardNo)
- {
- var StuVolunteerData = stuVolunteerIBLL.GetEntityByCardNo(CardNo);
-
- return Success(StuVolunteerData);
- }
-
- public ActionResult SearchCard(string CardNo)
- {
- var StuVolunteerData = stuVolunteerIBLL.GetEntityByCardNo(CardNo);
- var jsonData = new
- {
- StuVolunteer = StuVolunteerData,
- };
- return Success(jsonData);
- }
- #endregion
- }
- }
|