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

                _service.UpdateZhuZhaiJiZhunJia(entity);
                _service.Save();

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

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

                _service.AddZhuZhaiJiZhunJia(entity);
                _service.Save();

                this.GetCmp <Window>("windowZhuZhaiJiZhunJia").Hide();
                this.GetCmp <Store>("storeZhuZhaiJiZhunJia").Reload();

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