Beispiel #1
0
        public ActionResult Update(GongYePianQu entity)
        {
            if (ModelState.IsValid)
            {
                entity.LastModifiedBy   = GetCurrentUserName();
                entity.LastModifiedDate = DateTime.Now;

                _gongYePianQuService.UpdateGongYePianQu(entity);
                _gongYePianQuService.Save();

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

            return(this.Direct());
        }
Beispiel #2
0
        public ActionResult Insert(GongYePianQu entity)
        {
            if (ModelState.IsValid)
            {
                entity.CreatedBy   = GetCurrentUserName();
                entity.CreatedDate = DateTime.Now;
                entity.OrgNamePath = GetOrganizationNamePath();
                entity.AreaPath    = GetOrganizationAreaPath();

                _gongYePianQuService.AddGongYePianQu(entity);
                _gongYePianQuService.Save();

                this.GetCmp <Window>("windowGongYePianQu").Hide();
                this.GetCmp <Store>("storeGongYePianQu").Reload();

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