Пример #1
0
        public ActionResult Create([Bind(Include = "Name,Description")] AccountType accountType)
        {
            if (ModelState.IsValid)
            {
                _service.Create(accountType);
                return(RedirectToAction("Index"));
            }

            return(View(accountType));
        }
Пример #2
0
        public IMessageProvider Create()
        {
            var serialNo = SerialNoHelper.Create();

            InnerObject.State = AccountTypeStates.Normal;
            AccountTypeService.Create(InnerObject);

            AddMessage("success", DisplayName);
            Logger.LogWithSerialNo(LogTypes.AccountTypeCreate, serialNo, InnerObject.AccountTypeId, DisplayName);
            CacheService.Refresh(CacheKeys.PointPolicyKey);
            return(this);
        }
Пример #3
0
 // POST: api/AccountType
 public IHttpActionResult Post([FromBody] AccountType model)
 {
     _service.Create(model);
     return(Ok(model));
 }