public ActionResult Insert(ZhuZhaiTaoFangZongHeXinXi entity) { if (ModelState.IsValid) { if (_service.GetZhuZhaiTaoFangZongHeXinXiByDanYuanBianHao(entity.DanYuanBianHao) == null) { var louDongXiuZheng = _service.GetZhuZHaiLouDongXiuZhengByZhuangBianHao(entity.LouDongBianHao); entity.LouPanBianHao = louDongXiuZheng.WuYeBianHao; entity.LouPanMingCheng = louDongXiuZheng.WuYeMingCheng; entity.OrgNamePath = GetOrganizationNamePath(); entity.CreatedBy = GetCurrentUserName(); entity.CreatedDate = DateTime.Now; _service.AddZhuZhaiTaoFangZongHeXinXi(entity); _service.Save(); } else { X.Msg.Alert(MsgInfo.TI_SHI, MsgInfo.INSERT_CHECK_EXIT).Show(); return(this.Direct()); } this.GetCmp <Window>("windowZhuZhaiTaoFangZongHeXinXi").Hide(); this.GetCmp <Store>("storeZhuZhaiTaoFangZongHeXinXi").Reload(); return(this.Direct()); } return(this.Direct()); }