Exemplo n.º 1
0
        public ActionResult Add(Msg_EmailSetting model)
        {
            Result <int>     result = new Result <int>();
            ResultView <int> view   = new ResultView <int>();

            if (Request.Form["IsEnable"] == EnumState.Enable.ToString())
            {
                model.IsEnable = true;
            }
            else
            {
                model.IsEnable = false;
            }
            if (Request.Form["IsConfirm"] == EnumState.Confirmed.ToString())
            {
                model.IsConfirm = true;
            }
            else
            {
                model.IsConfirm = false;
            }
            using (MessageClientProxy proxy = new MessageClientProxy(ProxyEx(Request)))
            {
                result = proxy.AddEmailSetting(model);
                view   = result.ToResultView();
            }
            return(Json(view));
        }