1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Web;
- using System.Web.Mvc;
- using EMIS.CommonLogic.CerificateManage;
- using EMIS.ViewModel;
- using EMIS.Web.Controls;
- using Bowin.Web.Controls.Mvc;
- using EMIS.Utility;
- using EMIS.ViewModel.CerificateManage;
- namespace EMIS.Web.ServiceControllers.CertisfierManage
- {
- public class CertisfierServicesController : Controller
- {
- public ICertisfierDistributeServices ICertisfierDistributeService { get; set; }
- /// <summary>
- /// 证书列表查询
- /// </summary>
- /// <param name="pararms"></param>
- /// <returns></returns>
- public ActionResult CertisfierListView(Guid userID, int? pageIndex, int? pageSize)
- {
- return base.Json(ICertisfierDistributeService.GetCertificateMobileViewGrid(pageIndex, pageSize, userID));
- }
- /// <summary>
- /// 领取方式列表
- /// </summary>
- /// <returns></returns>
- public ActionResult DictionaryDropDown()
- {
- List<DropdownListItem> list = DictionaryHelper.GetDictionaryValue(EMIS.ViewModel.DictionaryItem.ER_CertisfierDistributeType)
- .Where(x => x.RecordStatus > (int)SYS_STATUS.UNUSABLE)
- .Select(x => new DropdownListItem { Text = x.Name, Value = x.Value.ToString() }).ToList();
- return base.Json(list);
- }
- /// <summary>
- /// 修改领取方式
- /// </summary>
- /// <param name="view"></param>
- /// <returns></returns>
- public ActionResult StuEdit(CertificateMobileView view)
- {
- try
- {
- CerificateView certificateView = new CerificateView();
- certificateView.CertisfierDistributeID = view.CertisfierDistributeID;
- certificateView.DistributeTypeID = view.DistributeTypeID;
- certificateView.EntrustDistributer = view.ContactPerson;
- certificateView.ContactPerson = view.ContactPerson;
- certificateView.ContactNo = view.ContactNo;
- certificateView.MailContactNo = view.ContactNo;
- certificateView.ContactIDNo = view.ContactIDNo;
- certificateView.Address = view.Address;
- ICertisfierDistributeService.UpdateCertisfierDistributeType(certificateView);
- return Json(new
- {
- isSuccess = true,
- message = "保存成功。"
- });
- }
- catch (Exception ex)
- {
- return Json(new
- {
- isSuccess = false,
- message = "保存失败,原因:" + ex.Message
- });
- }
- }
- /// <summary>
- /// 获取字典
- /// </summary>
- /// <param name="ID"></param>
- /// <returns></returns>
- public ActionResult GetView(Guid ID)
- {
- var view = ICertisfierDistributeService.GetView(ID);
- return Json(view);
- }
- }
- }
|