Exemplo n.º 1
0
        public ActionResult Update(ZhuZhaiChengJiao entity)
        {
            if (ModelState.IsValid)
            {
                entity.LastModifiedBy   = GetCurrentUserName();
                entity.LastModifiedDate = DateTime.Now;

                _service.UpdateZhuZhaiChengJiao(entity);
                _service.Save();

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

            return(this.Direct());
        }
Exemplo n.º 2
0
        public ActionResult Insert(ZhuZhaiChengJiao entity)
        {
            if (ModelState.IsValid)
            {
                entity.OrgNamePath = GetOrganizationNamePath();
                entity.CreatedBy   = GetCurrentUserName();
                entity.CreatedDate = DateTime.Now;

                _service.AddZhuZhaiChengJiao(entity);
                _service.Save();

                this.GetCmp <Window>("windowZhuZhaiChengJiao").Hide();
                this.GetCmp <Store>("storeZhuZhaiChengJiao").Reload();

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