Пример #1
0
        public ActionResult Update(BanGongChengJiao entity)
        {
            if (ModelState.IsValid)
            {
                entity.LastModifiedBy   = GetCurrentUserName();
                entity.LastModifiedDate = DateTime.Now;

                _service.UpdateBanGongChengJiao(entity);
                _service.Save();

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

            return(this.Direct());
        }
Пример #2
0
        public ActionResult Insert(BanGongChengJiao entity)
        {
            if (ModelState.IsValid)
            {
                entity.OrgNamePath = GetOrganizationNamePath();
                entity.CreatedBy   = GetCurrentUserName();
                entity.CreatedDate = DateTime.Now;

                _service.AddBanGongChengJiao(entity);
                _service.Save();

                this.GetCmp <Window>("windowBanGongChengJiao").Hide();
                this.GetCmp <Store>("storeBanGongChengJiao").Reload();

                return(this.Direct());
            }
            return(this.Direct());
        }