Example #1
0
        /// <summary>
        /// 加载具体保险信息
        /// </summary>
        /// <param name="pid"></param>
        private void InitProductType(int pid)
        {
            ProductManager proBLL = new ProductManager();
            DataTable      data   = To_PolicyDetailManager.GetListByPolicyid(pid);


            RpProType.DataSource = data;
            RpProType.DataBind();


            decimal coverage = 0;
            decimal premium  = 0;

            for (int i = 0; i < data.Rows.Count; i++)
            {
                if (data.Rows[i]["fmone"] != null && data.Rows[i]["rich"] != null)
                {
                    coverage += Convert.ToDecimal(data.Rows[i]["fmone"]);
                    premium  += Convert.ToDecimal(data.Rows[i]["rich"]);
                }
            }

            totalCoverage.InnerText = coverage.ToString("C");
            totalPremium.InnerText  = premium.ToString("C");
        }
Example #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            object id = Request["id"];

            if (id == null || id.ToString() == string.Empty)
            {
                Response.Write("暂无数据");
                return;
            }

            ProductManager proBLL = new ProductManager();
            DataTable      dt     = proBLL.GetList(string.Format("ProdTypeID='{0}'", id));

            if (dt.Rows.Count == 0)
            {
                Response.Write("暂无数据");
                return;
            }
            RpProType.DataSource = dt;
            RpProType.DataBind();
        }