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

                _banGongService.UpdateBanGongJiZhunJia(entity);
                _banGongService.Save();

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

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

                _banGongService.AddBanGongJiZhunJia(entity);
                _banGongService.Save();

                this.GetCmp <Window>("windowBanGongJiZhunJia").Hide();
                this.GetCmp <Store>("storeBanGongJiZhunJia").Reload();

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