No puede seleccionar más de 25 temas
Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
|
- using Learun.Application.Base.SystemModule;
- using Learun.Application.TwoDevelopment.EducationalAdministration;
- using Learun.Util;
- using Nancy;
- using System;
- using System.Collections.Generic;
- using System.IO;
-
- namespace Learun.Application.WebApi.Modules
- {
- /// <summary>
- /// 塔里木官网学生报名
- /// </summary>
- public class StuEnrollOfficialApi : BaseNoLoginApi
- {
- public StuEnrollOfficialApi()
- : base("/learun/nologin/adms/stuenrollofficial")
- {
- Post["/save"] = SaveForm;
- Get["/getmajor"] = GetMajor;
- }
- private StuEnrollOfficialIBLL stuEnrollOfficialIBLL = new StuEnrollOfficialBLL();
- private CdMajorIBLL cdMajorIBLL = new CdMajorBLL();
- /// <summary>
- /// 保存实体数据(新增、修改)
- /// <param name="_"></param>
- /// <summary>
- /// <returns></returns>
- public Response SaveForm(dynamic _)
- {
- ReqFormEntity parameter = this.GetReqData<ReqFormEntity>();
- StuEnrollOfficialEntity entity = parameter.strEntity.ToObject<StuEnrollOfficialEntity>();
-
- stuEnrollOfficialIBLL.SaveEntity(parameter.keyValue, entity);
- return Success("保存成功!");
- }
- /// <summary>
- /// 根据省份获取专业数据
- /// <param name="_"></param>
- /// <summary>
- /// <returns></returns>
- public Response GetMajor(dynamic _)
- {
- string str = this.GetReqData();
- var data= cdMajorIBLL.GetListByProvince(str);
- return Success(data);
- }
-
- #region 私有类
-
- /// <summary>
- /// 表单实体类
- /// <summary>
- private class ReqFormEntity
- {
- public string keyValue { get; set; }
- public string strEntity { get; set; }
- }
- #endregion
-
- }
- }
|