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());
        }
        public ActionResult Update(ZhuZhaiTaoFangZongHeXinXi entity)
        {
            if (ModelState.IsValid)
            {
                //entity.ZhuZhaiLouDongXiuZheng = _service.GetZhuZHaiLouDongXiuZhengByZhuangBianHao(entity.LouDongBianHao);
                entity.OrgNamePath      = GetOrganizationNamePath();
                entity.LastModifiedBy   = GetCurrentUserName();
                entity.LastModifiedDate = DateTime.Now;

                _service.UpdateZhuZhaiTaoFangZongHeXinXi(entity);
                _service.Save();

                this.GetCmp <Window>("windowZhuZhaiTaoFangZongHeXinXi").Hide();
                this.GetCmp <Store>("storeZhuZhaiTaoFangZongHeXinXi").Reload();
                return(this.Direct());
            }

            return(this.Direct());
        }