public ActionResult Insert(ZhuZhaiLouDongXiuZheng entity) { if (ModelState.IsValid) { if ( _service.GetZhuZhaiLouDongXiuZhengByZhuangHao(entity.WuYeBianHao, entity.WuYeLeiXing, entity.LouDong) == null) { entity.OrgNamePath = GetOrganizationNamePath(); entity.CreatedBy = GetCurrentUserName(); entity.CreatedDate = DateTime.Now; _service.AddZhuZhaiLouDongXiuZheng(entity); _service.Save(); } else { X.Msg.Alert(MsgInfo.TI_SHI, MsgInfo.INSERT_CHECK_EXIT_LOUDONG).Show(); return(this.Direct()); } this.GetCmp <Window>(ExtHelper.windowZhuZhaiLouDongXiuZheng.ToString()).Hide(); this.GetCmp <Store>(ExtHelper.storeZhuZhaiLouDongXiuZheng.ToString()).Reload(); return(this.Direct()); } return(this.Direct()); }