Ejemplo n.º 1
0
        public async Task <IActionResult> Add(UOM model)
        {
            if (ModelState.IsValid)
            {
                var user = await GetCurrentUserAsync();

                var siteId = user.SiteID;
                model.SiteId      = siteId;
                model.CreatedBy   = user.Name;
                model.CreatedDate = DateTime.Now;

                _repository.AddUOM(model);
                ModelState.Clear();
                return(RedirectToAction("list", new { id = "success" }));
            }

            return(View());
        }