|
- using Learun.Application.TwoDevelopment.AdmissionsPlatform;
- using Learun.Util;
- using System;
- using System.Collections.Generic;
- using System.Data;
- using System.Web.Mvc;
-
- namespace Learun.Application.Web.Areas.AdmissionsPlatform.Controllers
- {
- /// <summary>
- /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
- /// Copyright (c) 2013-2018 北京泉江科技有限公司
- /// 创 建:超级管理员
- /// 日 期:2020-04-17 15:45
- /// 描 述:招生人员信息
- /// </summary>
- public class AP_OnlineUserInfoController : MvcControllerBase
- {
- private AP_OnlineUserInfoIBLL onlineUserInfoIBLL = new AP_OnlineUserInfoBLL();
-
- #region 视图功能
-
- /// <summary>
- /// 主页面
- /// <summary>
- /// <returns></returns>
- [HttpGet]
- public ActionResult Index()
- {
- return View();
- }
- /// <summary>
- /// 表单页
- /// <summary>
- /// <returns></returns>
- [HttpGet]
- public ActionResult Form()
- {
- return View();
- }
- /// <summary>
- /// 主页面【报名信息】
- /// <summary>
- /// <returns></returns>
- [HttpGet]
- public ActionResult RegistrateIndex()
- {
- return View();
- }
- /// <summary>
- /// 关联教师
- /// <summary>
- /// <returns></returns>
- [HttpGet]
- public ActionResult BindTeacherForm()
- {
- return View();
- }
- /// <summary>
- /// 缴费
- /// <summary>
- /// <returns></returns>
- [HttpGet]
- public ActionResult PaymentForm()
- {
- return View();
- }
- /// <summary>
- /// 报到
- /// <summary>
- /// <returns></returns>
- [HttpGet]
- public ActionResult ReportForm()
- {
- return View();
- }
- /// <summary>
- /// 表单【报名信息】
- /// <summary>
- /// <returns></returns>
- [HttpGet]
- public ActionResult RegistrateForm()
- {
- return View();
- }
- /// <summary>
- /// 主页面【缴费信息】
- /// <summary>
- /// <returns></returns>
- [HttpGet]
- public ActionResult PaymentIndex()
- {
- return View();
- }
- /// <summary>
- /// 主页面【报到信息】
- /// <summary>
- /// <returns></returns>
- [HttpGet]
- public ActionResult ReportIndex()
- {
- return View();
- }
- /// <summary>
- /// 主页面【退学信息】
- /// <summary>
- /// <returns></returns>
- [HttpGet]
- public ActionResult DropOutIndex()
- {
- return View();
- }
- #endregion
-
- #region 获取数据
-
- /// <summary>
- /// 获取列表数据
- /// <summary>
- /// <returns></returns>
- [HttpGet]
- [AjaxOnly]
- public ActionResult GetList(string queryJson)
- {
- var data = onlineUserInfoIBLL.GetList(queryJson);
- return Success(data);
- }
- /// <summary>
- /// 获取列表分页数据
- /// <param name="pagination">分页参数</param>
- /// <summary>
- /// <returns></returns>
- [HttpGet]
- [AjaxOnly]
- public ActionResult GetPageList(string pagination, string queryJson)
- {
- Pagination paginationobj = pagination.ToObject<Pagination>();
- var data = onlineUserInfoIBLL.GetPageList(paginationobj, queryJson);
- var jsonData = new
- {
- rows = data,
- total = paginationobj.total,
- page = paginationobj.page,
- records = paginationobj.records
- };
- return Success(jsonData);
- }
- /// <summary>
- /// 获取列表分页数据
- /// <param name="pagination">分页参数</param>
- /// <summary>
- /// <returns></returns>
- [HttpGet]
- [AjaxOnly]
- public ActionResult GetPageListOfRegistrate(string pagination, string queryJson)
- {
- Pagination paginationobj = pagination.ToObject<Pagination>();
- var data = onlineUserInfoIBLL.GetPageListOfRegistrate(paginationobj, queryJson);
- var jsonData = new
- {
- rows = data,
- total = paginationobj.total,
- page = paginationobj.page,
- records = paginationobj.records
- };
- return Success(jsonData);
- }
- /// <summary>
- /// 获取表单数据
- /// <param name="keyValue">主键</param>
- /// <summary>
- /// <returns></returns>
- [HttpGet]
- [AjaxOnly]
- public ActionResult GetFormData(string keyValue)
- {
- var data = onlineUserInfoIBLL.GetEntity(keyValue);
- return Success(data);
- }
- /// <summary>
- /// 获取表单数据
- /// <summary>
- /// <returns></returns>
- [HttpGet]
- [AjaxOnly]
- public ActionResult GetRegistrateFormData(string keyValue)
- {
- var AP_OnlineUserInfoData = onlineUserInfoIBLL.GetEntity(keyValue);
- var AP_OnlineStudentInfoData = onlineUserInfoIBLL.GetAP_OnlineStudentInfoEntity(keyValue);
- var AP_OnlineStudentResumeInfoData = onlineUserInfoIBLL.GetAP_OnlineStudentResumeInfoList(keyValue);
- var AP_OnlineStudentFamilyInfoData = onlineUserInfoIBLL.GetAP_OnlineStudentFamilyInfoList(keyValue);
- var jsonData = new
- {
- AP_OnlineUserInfo = AP_OnlineUserInfoData,
- AP_OnlineStudentInfo = AP_OnlineStudentInfoData,
- AP_OnlineStudentResumeInfo = AP_OnlineStudentResumeInfoData,
- AP_OnlineStudentFamilyInfo = AP_OnlineStudentFamilyInfoData,
- };
- return Success(jsonData);
- }
- #endregion
-
- #region 提交数据
-
- /// <summary>
- /// 删除实体数据
- /// <param name="keyValue">主键</param>
- /// <summary>
- /// <returns></returns>
- [HttpPost]
- [AjaxOnly]
- public ActionResult DeleteForm(string keyValue)
- {
- onlineUserInfoIBLL.DeleteEntity(keyValue);
- return Success("删除成功!");
- }
- /// <summary>
- /// 保存实体数据(新增、修改)
- /// <param name="keyValue">主键</param>
- /// <summary>
- /// <returns></returns>
- [HttpPost]
- [ValidateAntiForgeryToken]
- [AjaxOnly]
- public ActionResult SaveForm(string keyValue, AP_OnlineUserInfoEntity entity)
- {
- onlineUserInfoIBLL.SaveEntity(keyValue, entity);
- return Success("保存成功!");
- }
- /// <summary>
- /// 保存实体数据(新增、修改)
- /// <param name="keyValue">主键</param>
- /// <summary>
- /// <returns></returns>
- [HttpPost]
- [ValidateAntiForgeryToken]
- [AjaxOnly]
- public ActionResult SaveRegistrateForm(string keyValue, string strEntity, string strStudentEntity, string strOnlineStudentResumeList, string strOnlineStudentFamilyList)
- {
- AP_OnlineUserInfoEntity entity = strEntity.ToObject<AP_OnlineUserInfoEntity>();
- if (string.IsNullOrEmpty(keyValue))
- {
- entity.Password = "123456";
- entity.TypeId = "1";
- }
- entity.CreateDate = DateTime.Now;
- entity.AppStatus = "0";
- AP_OnlineStudentInfoEntity studentEntity = strStudentEntity.ToObject<AP_OnlineStudentInfoEntity>();
- entity.CampusId = studentEntity.SchoolId;
- studentEntity.IsReportId = "0";
- studentEntity.CreateDate = DateTime.Now;
- List<AP_OnlineStudentResumeInfoEntity> onlineStudentResumeList = strOnlineStudentResumeList.ToObject<List<AP_OnlineStudentResumeInfoEntity>>();
- List<AP_OnlineStudentFamilyInfoEntity> onlineStudentFamilyList = strOnlineStudentFamilyList.ToObject<List<AP_OnlineStudentFamilyInfoEntity>>();
- onlineUserInfoIBLL.SaveRegistrateForm(keyValue, entity, studentEntity, onlineStudentResumeList, onlineStudentFamilyList);
- return Success("保存成功!");
- }
-
- /// <summary>
- /// 删除实体数据
- /// <param name="keyValue">主键</param>
- /// <summary>
- /// <returns></returns>
- [HttpPost]
- [AjaxOnly]
- public ActionResult DeleteRegistrateInfo(string keyValue)
- {
- onlineUserInfoIBLL.DeleteRegistrateInfo(keyValue);
- return Success("删除成功!");
- }
-
- /// <summary>
- /// 审核
- /// <param name="keyValue">主键</param>
- /// <summary>
- /// <returns></returns>
- [HttpPost]
- [AjaxOnly]
- public ActionResult DoCheck(string keyValue, string status)
- {
- onlineUserInfoIBLL.DoCheck(keyValue, status);
- return Success("操作成功!");
- }
-
- /// <summary>
- /// 退学
- /// <param name="keyValue">主键</param>
- /// <summary>
- /// <returns></returns>
- [HttpPost]
- [AjaxOnly]
- public ActionResult DoDropOut(string keyValue, string status)
- {
- onlineUserInfoIBLL.DoDropOut(keyValue, status);
- return Success("操作成功!");
- }
- /// <summary>
- /// 关联教师
- /// <param name="keyValue">主键</param>
- /// <summary>
- /// <returns></returns>
- [HttpPost]
- [ValidateAntiForgeryToken]
- [AjaxOnly]
- public ActionResult BindTeacher(string keyValue, AP_OnlineUserInfoEntity entity)
- {
- onlineUserInfoIBLL.BindTeacher(keyValue, entity);
- return Success("保存成功!");
- }
- /// <summary>
- /// 缴费
- /// <param name="keyValue">主键</param>
- /// <summary>
- /// <returns></returns>
- [HttpPost]
- [ValidateAntiForgeryToken]
- [AjaxOnly]
- public ActionResult DoPayment(string keyValue, AP_OnlineUserInfoEntity entity)
- {
- onlineUserInfoIBLL.DoPayment(keyValue, entity);
- return Success("保存成功!");
- }
-
- /// <summary>
- /// 报到
- /// <param name="keyValue">主键</param>
- /// <summary>
- /// <returns></returns>
- [HttpPost]
- [ValidateAntiForgeryToken]
- [AjaxOnly]
- public ActionResult DoReport(string keyValue, AP_OnlineUserInfoEntity entity)
- {
- onlineUserInfoIBLL.DoReport(keyValue, entity);
- return Success("保存成功!");
- }
- #endregion
-
- }
- }
|