public ActionResult Insert(ZhuZhaiJiChuXinXi entity)
        {
            if (ModelState.IsValid)
            {
                if (_service.GetZhuZhaiJiChunXinXiByWuYeBianHao(entity.WuYeBianHao) == null)
                {
                    entity.YunXuPingGu = GetCheckBoxValue(entity.YunXuPingGu);
                    entity.KeJian      = GetCheckBoxValue(entity.KeJian);
                    entity.OrgNamePath = GetOrganizationNamePath();
                    entity.CreatedBy   = GetCurrentUserName();
                    entity.CreatedDate = DateTime.Now;

                    _service.AddZhuZhaiJiChuXinXi(entity);
                    _service.Save();
                }
                else
                {
                    X.Msg.Alert(MsgInfo.TI_SHI, MsgInfo.INSERT_CHECK_EXIT).Show();
                    return(this.Direct());
                }

                this.GetCmp <Window>(ExtHelper.windowZhuZhaiJiChuXinXi.ToString()).Hide();
                this.GetCmp <Store>(ExtHelper.storeZhuZhaiJiChuXinXi.ToString()).Reload();

                return(this.Direct());
            }
            return(this.Direct());
        }
예제 #2
0
        public ActionResult Insert(ZhuZhaiJiChuXinXi entity)
        {
            if (ModelState.IsValid)
            {
                entity.YunXuPingGu = GetCheckBoxValue(entity.YunXuPingGu);
                entity.KeJian      = GetCheckBoxValue(entity.KeJian);
                entity.OrgNamePath = GetOrganizationNamePath();
                entity.CreatedBy   = GetCurrentUserName();
                entity.CreatedDate = DateTime.Now;

                _service.AddZhuZhaiJiChuXinXi(entity);
                _service.Save();

                this.GetCmp <Window>(ExtHelper.windowZhuZhaiJiChuXinXi.ToString()).Hide();
                this.GetCmp <Store>(ExtHelper.storeZhuZhaiJiChuXinXi.ToString()).Reload();

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