Beispiel #1
0
        public ActionResult Insert(XiuZhengTiXi entity)
        {
            if (ModelState.IsValid)
            {
                entity.CreatedBy   = GetCurrentUserName();
                entity.CreatedDate = DateTime.Now;
                entity.AreaPath    = GetOrganizationAreaPath();

                _service.AddXiuZhengTiXi(entity);
                _service.Save();

                this.GetCmp <Window>(ExtHelper.windowXiuZhengTiXi.ToString()).Hide();
                this.GetCmp <Store>(ExtHelper.storeXiuZhengTiXi.ToString()).Reload();

                return(this.Direct());
            }
            return(this.Direct());
        }
Beispiel #2
0
        public ActionResult Update(XiuZhengTiXi entity)
        {
            if (ModelState.IsValid)
            {
                entity.LastModifiedBy   = GetCurrentUserName();
                entity.LastModifiedDate = DateTime.Now;

                _service.UpdateXiuZhengTiXi(entity);
                _service.Save();

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

            return(this.Direct());
        }