public ActionResult CreatePhone(CreatePhoneInputModel inputModel)
        {
            if (!this.ModelState.IsValid)
            {
                return(null);
            }
            var phone = this.phonesServices.CreatePhone(inputModel, this.User.Identity.GetUserId());

            return(this.RedirectToAction("Index"));
        }
        public ActionResult CreatePhone()
        {
            var viewModel = new CreatePhoneInputModel();
            var list      = new List <SelectListItem>();

            for (int i = 2000; i < DateTime.Now.Year; i++)
            {
                list.Add(new SelectListItem()
                {
                    Value = i.ToString(),
                    Text  = i.ToString()
                });
            }

            viewModel.AvaivableYears = list;
            return(this.View(viewModel));
        }