//改 #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)); }
public ActionResult Detail(int id = 0) { Response _resp = new Response(); Product _product = _productmanager.Find(id); if (_product == null) { _resp.Status = 0; _resp.Message = "错误!未找到相关的保险产品合同"; return(Json(_resp, JsonRequestBehavior.AllowGet)); } //_resp.data下是PRODUCT类数据 //获取费率 ViewBag.Bxars = _productmanager.GetBxarList(_product.ProductId); ViewBag.BxIndustry = new SelectList(_bxindustrymanager.GetSelect().Select(a => a.BxIndustryName).ToArray()); ViewBag.BxType = new SelectList(_bxtypemanager.GetSelect().Select(a => a.BxTypeName).ToArray()); ViewBag.UnPubReason = _productmanager.GetUnPubReason(_product.ProductId); return(View(_product)); }