Пример #1
0
        //改

        #region         //改


        public ActionResult Edit(int id = 0)
        {
            Response _resp = new Response();

            _resp = _productmanager.CheckIsSon(id, Session["bxCorporateName"].ToString());
            if (_resp.Status == 0)
            {
                _resp.Data = null;
                return(Json(_resp, JsonRequestBehavior.AllowGet));
            }


            //_resp.data下是PRODUCT类数据
            //获取费率

            Product _product = _resp.Data as Product;

            //根据合同状态,确认能否修改

            if (!_productmanager.CheckCanEdit(_product))
            {
                _resp.Status  = 0;
                _resp.Data    = null;
                _resp.Message = "错误!只有未上架的保险合同才能被修改!";
                return(Json(_resp, JsonRequestBehavior.AllowGet));
            }
            ViewBag.Bxars = _productmanager.GetBxarList(_product.ProductId);

            ViewBag.UnPubReason = _productmanager.GetUnPubReason(_product.ProductId);

            ViewBag.BxIndustry = new SelectList(_bxindustrymanager.GetSelect().Select(a => a.BxIndustryName).ToArray());
            ViewBag.BxType     = new SelectList(_bxtypemanager.GetSelect().Select(a => a.BxTypeName).ToArray());

            return(View(_resp.Data));
        }