Ejemplo n.º 1
0
        public ActionResult Update(SubCategory entity)
        {
            if (ModelState.IsValid)
            {
                if (string.IsNullOrEmpty(entity.RecordType))
                {
                    entity.RecordType = RecordType.User.ToString();
                }

                entity.LastModifiedBy   = GetCurrentUserName();
                entity.LastModifiedDate = DateTime.Now;

                _service.UpdateSubCategory(entity);
                _service.Save();

                var window = this.GetCmp <Window>("windowSubCategory");
                window.Hide();
                this.GetCmp <Store>("storeSubCategory").Reload();
                return(this.Direct());
            }

            return(this.Direct());
        }