using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using CommonHelper; using GasolineBlend.BLL; using GasolineBlend.Entity; using GasolineBlend.Filter; namespace GasolineBlend.Controllers { public class TryApplyController:BaseController { private TryApplyBLL _acc=new TryApplyBLL(); [HttpPost] public ActionResult GetTryApplyList() { try { var list = _acc.GetTryApplyList(); return SuccessNoShow(data: list); } catch (Exception e) { LogHelper.Write(Level.Error, "获取体验申请列表 GetTryApplyList", e, OperatorProvider.Instance.Current.LoginName); //OperatorProvider.Instance.Current.LoginName return Error(); } } [HttpPost] [LoginChecked(false)] public ActionResult AddTryApply(string name,string email,string mobile,string wechat,string company,string position) { try { TryApply tryApply = new TryApply(); tryApply.name = name; tryApply.email = email; tryApply.mobile = mobile; tryApply.wechat = wechat; tryApply.company = company; tryApply.position = position; tryApply.createtime = DateTime.Now; tryApply.status = "已提交"; var list = _acc.AddTryApply(tryApply); return SuccessNoShow(data: list); } catch (Exception e) { LogHelper.Write(Level.Error, "添加申请列表 AddTryApply", e, OperatorProvider.Instance.Current.LoginName); // return Error(); } } [HttpPost] public ActionResult UpdateTryApply(string status,int id) { try { TryApply tryApply = new TryApply(); tryApply.id = id; tryApply.status = status; var list = _acc.UpdateTryApply(tryApply); return Success(data: list); } catch (Exception e) { LogHelper.Write(Level.Error, "修改申请列表 UpdateTryApply", e, OperatorProvider.Instance.Current.LoginName); // return Error(); } } } }