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

                _service.UpdateZhuZhaiLouDongXiuZheng(entity);
                _service.Save();

                var window = this.GetCmp <Window>(ExtHelper.windowZhuZhaiLouDongXiuZheng.ToString());
                window.Hide();
                this.GetCmp <Store>(ExtHelper.storeZhuZhaiLouDongXiuZheng.ToString()).Reload();
                return(this.Direct());
            }

            return(this.Direct());
        }