You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

62 regels
1.9 KiB

  1. using Learun.Application.Base.SystemModule;
  2. using Learun.Application.TwoDevelopment.EducationalAdministration;
  3. using Learun.Util;
  4. using Nancy;
  5. using System;
  6. using System.Collections.Generic;
  7. using System.IO;
  8. namespace Learun.Application.WebApi.Modules
  9. {
  10. /// <summary>
  11. /// 塔里木官网学生报名
  12. /// </summary>
  13. public class StuEnrollOfficialApi : BaseNoLoginApi
  14. {
  15. public StuEnrollOfficialApi()
  16. : base("/learun/nologin/adms/stuenrollofficial")
  17. {
  18. Post["/save"] = SaveForm;
  19. Get["/getmajor"] = GetMajor;
  20. }
  21. private StuEnrollOfficialIBLL stuEnrollOfficialIBLL = new StuEnrollOfficialBLL();
  22. private CdMajorIBLL cdMajorIBLL = new CdMajorBLL();
  23. /// <summary>
  24. /// 保存实体数据(新增、修改)
  25. /// <param name="_"></param>
  26. /// <summary>
  27. /// <returns></returns>
  28. public Response SaveForm(dynamic _)
  29. {
  30. ReqFormEntity parameter = this.GetReqData<ReqFormEntity>();
  31. StuEnrollOfficialEntity entity = parameter.strEntity.ToObject<StuEnrollOfficialEntity>();
  32. stuEnrollOfficialIBLL.SaveEntity(parameter.keyValue, entity);
  33. return Success("保存成功!");
  34. }
  35. /// <summary>
  36. /// 根据省份获取专业数据
  37. /// <param name="_"></param>
  38. /// <summary>
  39. /// <returns></returns>
  40. public Response GetMajor(dynamic _)
  41. {
  42. string str = this.GetReqData();
  43. var data= cdMajorIBLL.GetListByProvince(str);
  44. return Success(data);
  45. }
  46. #region 私有类
  47. /// <summary>
  48. /// 表单实体类
  49. /// <summary>
  50. private class ReqFormEntity
  51. {
  52. public string keyValue { get; set; }
  53. public string strEntity { get; set; }
  54. }
  55. #endregion
  56. }
  57. }