Ejemplo n.º 1
0
        public ActionResult Update(Category entity)
        {
            if (ModelState.IsValid)
            {
                if (string.IsNullOrEmpty(entity.RecordType))
                {
                    entity.RecordType = RecordType.User.ToString();
                }
                entity.LastModifiedBy   = GetCurrentUserName();
                entity.LastModifiedDate = DateTime.Now;
                _service.UpdateCategory(entity);
                _service.Save();

                var window = this.GetCmp <Window>(ExtHelper.windowCategory.ToString());
                window.Hide();
                this.GetCmp <Store>(ExtHelper.storeCategory.ToString()).Reload();
                return(this.Direct());
            }

            return(this.Direct());
        }