Esempio n. 1
0
        public ActionResult Create(FormCollection formCollection, SectionViewModel vo)
        {
            if (!ModelState.IsValid)
            {
                return(View(vo));
            }
            var entity = vo.ToEntity <SectionEntity>();

            entity.CreateUser = base.CurrentUser.CustomerId;
            entity.CreateDate = DateTime.Now;
            entity.UpdateDate = DateTime.Now;
            entity.UpdateUser = CurrentUser.CustomerId;
            entity.Status     = (int)DataStatus.Normal;
            _sectionRepo.Insert(entity);

            return(RedirectToAction("Edit", new { id = entity.Id }));
        }