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