leo
2022-12-28 4a43e25a1803e63b501e401b6c7896a19c3ef3d7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
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();
            }
        }
    }
}