//添加险种 private void AddProdType(string parent) { ProductTypeManager productTypeBLL = new ProductTypeManager(); EtNet_Models.ProductType productTypeModel = new EtNet_Models.ProductType(); productTypeModel.ParentId = parent; productTypeModel.ProdClass = ddlType.SelectedValue; productTypeModel.ProdTypeName = txtName.Text; productTypeModel.ProdTypeNo = MakeNum(parent); productTypeModel.TargetTypeId = Convert.ToInt32(ddlTarget.SelectedValue); productTypeBLL.Add(productTypeModel); hidId.Value = "ADD" + "$" + productTypeModel.ProdTypeNo + "$" + productTypeModel.ProdTypeName; }
/// <summary> /// 添加险种 /// </summary> private void AddProType() { ProductTypeManager productTypeBLL = new ProductTypeManager(); EtNet_Models.ProductType productTypeModel = new EtNet_Models.ProductType(); productTypeModel.ParentId = stvProType.SelectedValue.Trim() == string.Empty ? "0" : stvProType.SelectedValue; productTypeModel.ProdClass = ddlType.SelectedValue; productTypeModel.ProdTypeName = txtName.Text; productTypeModel.ProdTypeNo = MakeNum(); productTypeModel.TargetTypeId = Convert.ToInt32(ddlTarget.SelectedValue); if (productTypeBLL.Add(productTypeModel)) { stvProType.Nodes.Clear(); StvProTypeBindData(stvProType.Nodes, "0"); stvProType.ExpandAll(); } StvProTypeBindData(stvProType.Nodes, "0"); }