/// <summary> /// 加载数据 /// </summary> /// <param name="policyid"></param> private void LoadPolicyData(string policyid) { DataTable dt = To_PolicyManager.GetList(int.Parse(policyid)); int makerid; int.TryParse(dt.Rows[0]["policy_makerId"].ToString(), out makerid); LoginInfo login = LoginInfoManager.getLoginInfoById(makerid); DepartmentInfo depart = DepartmentInfoManager.getDepartmentInfoById(login.Departid); txtdepart.Value = depart.Departcname; //制单部门名称 txttime.Value = DateTime.Now.ToString("yyyy年MM月dd日"); //显示提交的时间 lblkhmc.Text = dt.Rows[0]["cusCName"].ToString(); //客户名称 lblxz.Text = dt.Rows[0]["ProdTypeName"].ToString(); //险种 txtzbf.Value = dt.Rows[0]["totalPremium"].ToString(); //总保费 txtjjf.Value = dt.Rows[0]["totalEconomic"].ToString(); //经济费 lblzffs.Text = Request.QueryString["type"].ToString(); //支付方式 lblbxgs.Text = dt.Rows[0]["comCname"].ToString(); //保险公司 txtzxf.Value = dt.Rows[0]["totalRich"].ToString(); //咨询费 lblbpr.Text = dt.Rows[0]["policy_maker"].ToString();//报批人 }
private void loadPolicyData(string policyId) { DataTable dt = To_PolicyManager.GetList(int.Parse(policyId)); int makerid; int.TryParse(dt.Rows[0]["policy_makerId"].ToString(), out makerid); LoginInfo login = LoginInfoManager.getLoginInfoById(makerid); DepartmentInfo department = DepartmentInfoManager.getDepartmentInfoById(login.Departid); txtdepart.Value = department.Departcname; txttime.Value = DateTime.Now.ToString("yyyy年MM月dd日"); lblkhmc.Text = dt.Rows[0]["cusCName"].ToString(); //客户名称 lblcm.Text = dt.Rows[0]["shipName"].ToString(); //船名 lbltbrq.Text = Convert.IsDBNull(dt.Rows[0]["policy_date"]) ? "" : Convert.ToDateTime(dt.Rows[0]["policy_date"]).ToString("yyyy年MM月dd日"); //投保日期 lblbxgs.Text = dt.Rows[0]["comCname"].ToString(); //保险公司 lblbxxz.Text = dt.Rows[0]["ProdTypeName"].ToString(); //险种 lblbfhj.Text = dt.Rows[0]["totalPremium"].ToString(); //总保费 bank.InnerHtml = "公司名称:" + dt.Rows[0]["cardName"].ToString() + "<br />开 户 行:" + dt.Rows[0]["bank"].ToString() + "<br />账 号:" + dt.Rows[0]["cardId"].ToString(); //银行信息 lblbpr.Text = dt.Rows[0]["policy_maker"].ToString(); //报批人 }
/// <summary> /// 加载保费与经济费 /// </summary> /// <param name="policyID">保单ID</param> private void LoadPremium(int policyID) { To_Policy policy = To_PolicyManager.getTo_PolicyById(policyID); TxtPremium.Text = policy.TotalPremium.ToString("F2"); //保费 TxtBrokerage.Text = policy.TotalBrokerage.ToString("F2"); //经济费 if (policy.IsDaidian == 1) { TxtExpPremium.Text = policy.TotalPremium.ToString("F2"); //代垫保费 //DataTable dtPolicyDetail = To_PolicyDetailManager.GetListByPolicy(policyID); //if (dtPolicyDetail != null) //{ // double premium = 0; // for (int i = 0; i < dtPolicyDetail.Rows.Count; i++) // { // premium += Convert.ToDouble(dtPolicyDetail.Rows[i]["premium"]); // } // TxtPremium.Text = premium.ToString("F2"); //保费 // TxtExpPremium.Text = premium.ToString("F2"); //代垫保费 //} } }
/// <summary> /// 发消息给用户 /// </summary> /// <param name="msg">消息类型(已通过|被拒绝)</param> private void SendMessage(string msg) { EtNet_Models.Information messageEntity = new EtNet_Models.Information(); DataTable tbl = To_PolicyManager.GetLists(" isVerify=" + Request.QueryString["jobflowid"].ToString()); messageEntity.associationid = 0;//此处不需要,默认给一个值 messageEntity.contents = string.Format("编号为{0}的保单,{1}", tbl.Rows[0]["serialnum"], msg); messageEntity.createtime = DateTime.Now; messageEntity.founderid = (Session["login"] as LoginInfo).Id; messageEntity.sendtime = DateTime.Now; messageEntity.sortid = 1;//消息分类:个人消息 if (InformationManager.Add(messageEntity)) { int userID = int.Parse(tbl.Rows[0]["policy_makerId"].ToString()); int messageID = InformationManager.GetMaxId(); EtNet_Models.InformationNotice messageNoticeEntity = new InformationNotice(); messageNoticeEntity.informationid = messageID; messageNoticeEntity.recipientid = userID; messageNoticeEntity.remind = "是";//默认未阅读; InformationNoticeManager.Add(messageNoticeEntity); } }
/// <summary> /// 加载当前保单信息 /// </summary> /// <param name="id"></param> private void InitData(int id) { To_Policy policyModel = new To_Policy(); DataTable data = To_PolicyManager.GetList(id); if (data.Rows.Count > 0) { LblAssured.Text = data.Rows[0]["assured"].ToString(); //被保险人 //LblBrokerage.Text = data.Rows[0][""].ToString();//经纪费 LblCompany.Text = data.Rows[0]["comshortname"].ToString(); //保险公司 LblCustomer.Text = data.Rows[0]["cusshortName"].ToString(); //投保客户 LblIsRenewal.Text = Convert.ToInt32(data.Rows[0]["IsRenewal"]) == 0 ? "否" : "是"; //是否续保 LblPolicyDate.Text = Convert.ToDateTime(data.Rows[0]["policy_date"]).ToString("yyyy-MM-dd"); //保单日期 LblPolicyMaker.Text = data.Rows[0]["policy_maker"].ToString(); //制单人 LblPolicyNum.Text = data.Rows[0]["policy_num"].ToString(); //保单编号 LblPolicyState.Text = Convert.ToInt32(data.Rows[0]["policy_state"]) == 0 ? "无效" : "有效"; //保单状态 //LblPremium.Text = data.Rows[0][""].ToString();//保费合计 //LblSalesman.Text = data.Rows[0]["cname"].ToString();//所属业务员 LoginInfo userInfo = LoginInfoManager.getLoginInfoById(Convert.ToInt32(data.Rows[0]["policy_makerId"])); if (userInfo != null) { DepartmentInfo department = DepartmentInfoManager.getDepartmentInfoById(userInfo.Departid); if (department != null) { LblMakerDepart.Text = department.Departcname; //制单部门 } } zjjfrate.Text = data.Rows[0]["totalEcoRate"].ToString(); //总经济费比率 zbf.Text = data.Rows[0]["totalPremium"].ToString(); //总保费 zjjf.Text = data.Rows[0]["totalEconomic"].ToString(); //总经济费 zbe.Text = data.Rows[0]["totalBrokerage"].ToString(); //总保额 ztf.Text = data.Rows[0]["totalRich"].ToString(); //总贴费 cm.Text = data.Rows[0]["shipName"].ToString(); //船名 LblSerialNum.Text = data.Rows[0]["serialnum"].ToString(); //内部流水号 LblTimeEnd.Text = Convert.ToDateTime(data.Rows[0]["policy_enddate"]).ToString("yyyy-MM-dd"); //保单日期结束日期 LblTimeStart.Text = Convert.ToDateTime(data.Rows[0]["policy_startdate"]).ToString("yyyy-MM-dd"); //保单日期开始日期 ltrYearsCount.Text = (Convert.ToDateTime(data.Rows[0]["policy_enddate"]).Year - Convert.ToDateTime(data.Rows[0]["policy_startdate"]).Year).ToString(); LblType.Text = data.Rows[0]["ProdTypeName"].ToString(); //险种 optiniontxt.InnerHtml = ShowOpiniontxt(int.Parse(data.Rows[0]["isVerify"].ToString())); //审核人意见 lblUserCompany.Text = data.Rows[0]["userCompany"].ToString(); LoadAuditImg(int.Parse(data.Rows[0]["ruleid"].ToString())); InitProductType(id); LoadNowAudit(data.Rows[0]["isVerify"].ToString()); BudgetPre1.InitData(id); UCTarget1.BindTarget(id); LoadFile(); } }
private void LoadPolicyInfo(int policyId) { To_Policy mPolicy = To_PolicyManager.getTo_PolicyById(policyId); if (null == mPolicy) { return; } ltrPolicyInfo.Text = string.Format("您在查看编号为<font color='red'>{0}</font>的保单,保费<font color='red'>{1}代垫的</font>", mPolicy.Policy_num, mPolicy.IsDaidian == 0 ? "不是" : "是"); }
/// <summary> /// 检验是否能成功产生单据名称 /// </summary> /// <param name="cuscode">输入的客户代码</param> /// <param name="cname">客户代码全称</param> /// <param name="attachment">>客户代码不包含流水号</param> /// <param name="txt">流水号</param> private bool StrNumbers(string strcuscode, out string cuscode, out string codeformat, out string ordernum) { bool result = true; cuscode = ""; //客户代码全称 codeformat = ""; //名称,不包含流水号 ordernum = ""; //流水号 DataTable tbl = GetModuleCoding(); //自动编码 string txtformat = tbl.Rows[0]["txtformat"].ToString(); //名称的格式 string usecode = tbl.Rows[0]["usecode"].ToString(); //流水号 int len = int.Parse(tbl.Rows[0]["orderlen"].ToString()); //流水号长度 DataTable custbl = null; string strsql = ""; //查询字符窜 if (usecode == "0") { if (strcuscode.Trim() != "") { cuscode = strcuscode; //客户代码全称 } else { result = false; Page.ClientScript.RegisterClientScriptBlock(Page.GetType(), "test", "<script>alert('保存失败,业务编号不能为空!')</script>"); } } else { int num = 1; //默认流水号 codeformat = Numbers(txtformat); //名称 strsql = " codeFormart= '" + codeformat + "' AND LEN(orderNum) =" + len.ToString(); custbl = To_PolicyManager.GetList(1, strsql, " id desc "); if (custbl.Rows.Count >= 1) { if (custbl.Rows[0]["orderNum"].ToString() != "") { num = int.Parse(custbl.Rows[0]["orderNum"].ToString()) + 1; //流水号 if (num.ToString().Length > len) { result = false; Page.ClientScript.RegisterClientScriptBlock(Page.GetType(), "test", "<script>alert('保存失败,业务编号长度不够!')</script>"); } } } ordernum = num.ToString().PadLeft(len, '0'); //流水号 cuscode = codeformat + ordernum; //客户代码全称 } return(result); }
protected void Page_Load(object sender, EventArgs e) { object id = Request.QueryString["jobflowid"]; if (id == null || id.ToString() == "") { return; } int rid = 0; DataTable tbl = To_PolicyManager.GetLists(" isVerify=" + id.ToString()); rid = int.Parse(tbl.Rows[0]["id"].ToString()); InitData(Convert.ToInt32(rid)); }
public void ProcessRequest(HttpContext context) { context.Response.ContentType = "text/plain"; string msg = "ok"; object id = context.Request.QueryString["id"]; string snum = context.Request.QueryString["s"]; string pnum = context.Request.QueryString["p"]; if (To_PolicyManager.ExitsRecordByField("serialnum", snum, id)) { msg = "业务编号已存在"; } else if (To_PolicyManager.ExitsRecordByField("policy_num", pnum, id)) { msg = "保单编号已存在"; } context.Response.Write(msg); }
protected void comList_ItemCommand(object source, RepeaterCommandEventArgs e) { if (e.CommandName == "Delete") { string id = e.CommandArgument.ToString(); int count = To_PolicyManager.getTo_PolicyCountByCompanyID(id); if (count > 0) { ClientScript.RegisterClientScriptBlock(this.GetType(), "page", "alert('该保险公司有保单数据,不能删除。')", true); return; } else { CompanyManager.deleteCompany(Convert.ToInt32(id)); } } if (e.CommandName == "Update") { string id = e.CommandArgument.ToString(); Response.Redirect("UpdateCom.aspx?id=" + id); } if (e.CommandName == "Detial") { string id = e.CommandArgument.ToString(); Response.Redirect("ComDetial.aspx?id=" + id); } if (e.CommandName == "Read") { string id = e.CommandArgument.ToString(); Response.Redirect("Coverage.aspx?id=" + id); } if (e.CommandName == "Copy") { string id = e.CommandArgument.ToString(); Response.Redirect("CopyCom.aspx?id=" + id); } binddata(); }
/// <summary> /// 删除保单 /// </summary> /// <param name="id">保单的id值</param> private void Del(int id) { To_Policy policy = To_PolicyManager.getTo_PolicyById(id); if (policy != null) { int jobflowid = policy.IsVerify; JobFlow model = JobFlowManager.GetModel(jobflowid); if (model == null || model.auditstatus != "01") { Page.ClientScript.RegisterClientScriptBlock(Page.GetType(), "del", "<script>alert('保单已删除或审核员已审核')</script>"); } else { string strdel = " jobflowid=" + jobflowid; AuditJobFlowManager.Delete(strdel); JobFlowManager.Delete(jobflowid); To_PolicyManager.deleteTo_Policy(id); To_PolicyDetailManager.DeleteByPolicy(id); } } }
/// <summary> /// 加载数据 /// </summary> private void RpPolicyBindData() { AspNetPager1.RecordCount = To_PolicyManager.GetCount(FilterSql, (Session["login"] as LoginInfo).Id) ?? 0; LoginInfo login = Session["login"] as LoginInfo; SearchPageSet sps = SearchPageSetManager.getSearchPageSetByLoginId(login.Id, 015); if (sps == null) { AspNetPager1.NumericButtonCount = 10; AspNetPager1.PageSize = 10; } else { AspNetPager1.NumericButtonCount = sps.Pagecount; AspNetPager1.PageSize = sps.Pageitem; } DataTable dtPolicy = To_PolicyManager.GetListByPage(null, (Session["login"] as LoginInfo).Id, "", FilterSql, AspNetPager1.StartRecordIndex, AspNetPager1.EndRecordIndex); RpPolicy.DataSource = dtPolicy; RpPolicy.DataBind(); }
/// <summary> /// 验证是否存在该保单 /// </summary> /// <param name="policyID">保单ID</param> /// <returns></returns> private bool ExitsPolicy(int policyID) { To_Policy policyModel = To_PolicyManager.getTo_PolicyById(policyID); return(policyModel != null); }
/// <summary> /// 添加保单的方法 /// </summary> /// <param name="policy"></param> private void Add(To_Policy policy) { int policyId = To_PolicyManager.addTo_Policy(policy); //具体保险项目 if (policyId > 0 && HidPros.Value != "") { //string[] items = HidPros.Value.TrimEnd('|').Split('|'); //To_PolicyDetail pdModel = new To_PolicyDetail(); //foreach (string item in items) //{ // string[] proInfo = item.Split('$'); // pdModel.Coverage = double.Parse(proInfo[1]);//保额 // pdModel.Premium = double.Parse(proInfo[2]);//保费 // pdModel.PolicyId = policyId;//保单ID // pdModel.ProductId = int.Parse(proInfo[0].Trim());//保险项目 // pdModel.Mark = proInfo[3];//备注 // To_PolicyDetailManager.addTo_PolicyDetail(pdModel); //} string[] list = HidPros.Value.Split(','); //以逗号分隔每一行的数据 string[] txt = null; //存储每一行每一个单元的数据 List <string> p = new List <string>(); //存储业务员汇总 To_PolicyDetail model = null; for (int i = 0; i < list.Length; i++) { model = new To_PolicyDetail(); txt = list[i].Split('|'); model.PolicyId = policyId; //保单id model.Salesman = txt[0]; //业务员 if (!p.Contains(txt[0])) { p.Add(txt[0]); } model.DepartName = txt[1]; //部门 model.NumRate = decimal.Parse(txt[2]); //比率 model.Fmone = decimal.Parse(txt[3]); //经济费 model.Rich = decimal.Parse(txt[4]); //贴费 model.Mark = txt[5]; //备注 To_PolicyDetailManager.addTo_PolicyDetail(model); } StringBuilder persons = new StringBuilder(); foreach (string s in p) { persons.Append(s + ";"); } To_PolicyManager.updateTo_PolicySalesman(persons.ToString(), policyId); //标的信息 if (HidTarget.Value != "") { string hidValues = HidTarget.Value.TrimEnd('@').Replace("\r\n", ""); string[] values = hidValues.Split('@'); To_PolicyTarget To_PolicyTarget = new To_PolicyTarget(); To_PolicyTarget.PolicyID = policyId; foreach (string value in values) { string[] propertyArr = value.Split('$'); To_PolicyTarget.Datatype = propertyArr[4].Trim() == "" ? 0 : int.Parse(propertyArr[4].Trim()); To_PolicyTarget.PropertyName = propertyArr[0].Trim(); To_PolicyTarget.PropertyTypeID = propertyArr[2].Trim() == "" ? 0 : int.Parse(propertyArr[2].Trim()); To_PolicyTarget.PropertyValue = propertyArr[1].Trim(); To_PolicyTarget.PropertyID = propertyArr[3].Trim() == "" ? 0 : int.Parse(propertyArr[3].Trim()); To_PolicyTargetManager.addTo_PolicyTarget(To_PolicyTarget); } } //上传附件并返回文件名集合 string[] str = FileUp(Request.Files); if (str[0] == "" && str[6] == "1") { SaveFilePath(str, policyId); } } _policyID = policyId; }
/// <summary> /// 保存保单(编辑或添加) /// </summary> /// <returns>返回业务编号</returns> private string SavePolicy(int jobflowid) { To_Policy policyModel = new To_Policy(); string cuscode = ""; //公司代码全称 string codeformat = ""; //公司代码,不包含流水号 string ordernum = ""; //流水号 if (StrNumbers(TxtSerialNum.Text.Trim(), out cuscode, out codeformat, out ordernum)) { policyModel.Assured = TxtAssured.Text; //被保险人 policyModel.Company = int.Parse(HidComId.Value); //保险公司 policyModel.Customer = int.Parse(HidCusId.Value); //投保客户 policyModel.IsVerify = jobflowid; //工作流管理id policyModel.Policy_date = Convert.ToDateTime(TxtPolicyDate.Text); //表单日期 policyModel.Policy_enddate = Convert.ToDateTime(txtEndTime.Text).ToString("yyyy-MM-dd"); //Convert.ToDateTime(TxtTimeStart.Text).AddYears(int.Parse(TxtYears.Text.Trim())).ToString("yyyy-MM-dd");//投保到期日期 policyModel.Policy_startdate = Convert.ToDateTime(TxtTimeStart.Text).ToString("yyyy-MM-dd"); //投保开始日期 policyModel.Policy_maker = TxtPolicyMaker.Text; //制单人 policyModel.Policy_num = TxtPolicyNum.Text; //表单编号 policyModel.Policy_state = Convert.ToInt32(DdlPolicyState.SelectedValue); //保单状态(0:无效;1:有效) policyModel.Protype = HidTypeId.Value; //险种 //policyModel.Salesman = int.Parse(HidSalesman.Value);// int.Parse(TxtSalesman.Text);//所属业务员 policyModel.Salesman = 0; //去掉主表中的业务员信息,将其设置为默认0; //policyModel.Serialnum = TxtSerialNum.Text;//内部流水号 policyModel.Verifydate = DateTime.Now; // Convert.ToDateTime(TxtVerifyDate.Text);//审核日期 policyModel.VerifyUser = ""; // TxtVerifyUser.Text;//审核人 policyModel.IsRenewal = Convert.ToInt32(DdlIsRenewal.SelectedValue); //是否续保 policyModel.UserCompany = ddlUnit.SelectedItem.Text; //经营单位 policyModel.TotalEcoRate = Convert.ToDouble(zjjfrate.Text); //总经济费比率 policyModel.TotalEconomic = Convert.ToDouble(this.zjjf.Text); //总经济费 policyModel.TotalRich = Convert.ToDouble(ztf.Text); //总贴费 policyModel.ShipName = cm.Text; //船名 policyModel.TotalPremium = Convert.ToDouble(zbf.Text); //总保费 policyModel.TotalBrokerage = Convert.ToDouble(zbe.Text); //总保额 policyModel.Txt = ""; //审核意见 policyModel.IsDaidian = int.Parse(DdlIsDaidian.SelectedValue.Trim()); //是否代垫保费,0:否,1:是 policyModel.OrderNum = ordernum; policyModel.CodeFormart = codeformat; policyModel.Serialnum = cuscode; object action = Request.QueryString["action"]; //表示编辑保单 if (action != null && action.ToString() == "edit") { List <string> p = new List <string>(); //存储业务员的汇总 object id = Request.QueryString["id"]; int rid = 0; if (id != null && int.TryParse(id.ToString(), out rid)) { policyModel.Id = rid; if (To_PolicyManager.updateTo_Policy(policyModel) > 0) { To_PolicyDetailManager.DeleteByPolicy(policyModel.Id); if (HidPros.Value != "") { string[] items = HidPros.Value.Split(','); string[] txt = null; To_PolicyDetail pdModel = null; foreach (string item in items) { pdModel = new To_PolicyDetail(); txt = item.Split('|'); pdModel.PolicyId = policyModel.Id; //保单id pdModel.Salesman = txt[0]; //业务员 if (!p.Contains(txt[0])) { p.Add(txt[0]); } pdModel.DepartName = txt[1]; //部门 pdModel.NumRate = decimal.Parse(txt[2]); //比率 pdModel.Fmone = decimal.Parse(txt[3]); //经济费 pdModel.Rich = decimal.Parse(txt[4]); //贴费 pdModel.Mark = txt[5]; //备注 To_PolicyDetailManager.addTo_PolicyDetail(pdModel); } StringBuilder persons = new StringBuilder(); foreach (string s in p) { persons.Append(s + ";"); } To_PolicyManager.updateTo_PolicySalesman(persons.ToString(), rid); } To_PolicyTargetManager.DeleteByPolicy(rid); if (HidTarget.Value != "") { string hidValues = HidTarget.Value.TrimEnd('@').Replace("\r\n", ""); string[] values = hidValues.Split('@'); To_PolicyTarget To_PolicyTarget = new To_PolicyTarget(); To_PolicyTarget.PolicyID = rid; foreach (string value in values) { string[] propertyArr = value.Split('$'); To_PolicyTarget.Datatype = propertyArr[4].Trim() == "" ? 0 : int.Parse(propertyArr[4].Trim()); To_PolicyTarget.PropertyName = propertyArr[0].Trim(); To_PolicyTarget.PropertyTypeID = propertyArr[2].Trim() == "" ? 0 : int.Parse(propertyArr[2].Trim()); To_PolicyTarget.PropertyValue = propertyArr[1].Trim(); To_PolicyTarget.PropertyID = propertyArr[3].Trim() == "" ? 0 : int.Parse(propertyArr[3].Trim()); To_PolicyTargetManager.addTo_PolicyTarget(To_PolicyTarget); } } if (HidFiles.Value != "") { string oldFiles = HidFiles.Value.Trim().TrimEnd(','); if (oldFiles != "") { To_PolicyFileManager policyFileBLL = new To_PolicyFileManager(); policyFileBLL.DeleteList(oldFiles); } } //上传附件并返回文件名集合 string[] str = FileUp(Request.Files); if (str[0] == "" && str[6] == "1") { SaveFilePath(str, rid); } } UCBudgetEdit1.SaveData(rid); } } //新增保单 else if (action != null && action.ToString() == "new") { policyModel.Policy_makerId = (Session["login"] as LoginInfo).Id; Add(policyModel); } } return(cuscode); }
/// <summary> /// 初始化信息 /// </summary> /// <param name="id"></param> /// <param name="loginID"></param> private void InitData(int id, int loginID) { DataTable data = To_PolicyManager.GetList(id); if (data.Rows.Count > 0) { if (data.Rows[0]["savestatus"].ToString().Trim() == "已提交") { Page.ClientScript.RegisterClientScriptBlock(Page.GetType(), "load", "<script>alert('已提交的保单不能修改');window.location='PolicyList.aspx'</script>"); } TxtAssured.Text = data.Rows[0]["assured"].ToString(); //被保险人 //TxtBrokerage.Text = data.Rows[0][""].ToString();//经纪费合计 TxtCompany.Text = data.Rows[0]["comshortname"].ToString(); //保险公司 TxtCustomer.Text = data.Rows[0]["cusShortName"].ToString(); //投保客户 TxtPolicyDate.Text = Convert.ToDateTime(data.Rows[0]["policy_date"]).ToString("yyyy-MM-dd"); //保单日期 TxtPolicyMaker.Text = data.Rows[0]["policy_maker"].ToString(); //制单人 TxtPolicyNum.Text = data.Rows[0]["policy_num"].ToString(); //保单编号 //TxtPremium.Text = data.Rows[0][""].ToString();//保费合计 //TxtSalesman.Text = data.Rows[0]["cname"].ToString();//所属业务员 TxtSerialNum.Text = data.Rows[0]["serialnum"].ToString(); //内部流水号 //TxtYears.Text = (Convert.ToDateTime(data.Rows[0]["policy_enddate"]).Year - Convert.ToDateTime(data.Rows[0]["policy_startdate"]).Year).ToString();//保单期限结束日期 TxtTimeStart.Text = Convert.ToDateTime(data.Rows[0]["policy_startdate"]).ToString("yyyy-MM-dd"); //保单期限开始日期 txtEndTime.Text = Convert.ToDateTime(data.Rows[0]["policy_enddate"]).ToString("yyyy-MM-dd"); TxtType.Text = data.Rows[0]["ProdTypeName"].ToString(); //险种 //TxtVerifyDate.Text = Convert.ToDateTime(data.Rows[0]["verifydate"]).ToString("yyyy-MM-dd");//审核日期 //TxtVerifyUser.Text = data.Rows[0]["verifyUser"].ToString();//审核人 DdlIsRenewal.SelectedIndex = data.Rows[0]["IsRenewal"] == null ? 1 : (data.Rows[0]["IsRenewal"].ToString() == "0" ? 1 : 0); //是否续保 //DdlIsVirify.SelectedIndex = data.Rows[0]["isVerify"] == null ? 1 : (data.Rows[0]["isVerify"].ToString() == "0" ? 1 : 0);//审核状态 DdlPolicyState.SelectedIndex = data.Rows[0]["policy_state"] == null ? 0 : (data.Rows[0]["policy_state"].ToString() == "0" ? 1 : 0); //保单状态 zjjfrate.Text = data.Rows[0]["totalEcoRate"].ToString(); //总经济费比率 zbf.Text = data.Rows[0]["totalPremium"].ToString(); //总保费 zjjf.Text = data.Rows[0]["totalEconomic"].ToString(); //总经济费 zbe.Text = data.Rows[0]["totalBrokerage"].ToString(); //总保额 ztf.Text = data.Rows[0]["totalRich"].ToString(); //总贴费 cm.Text = data.Rows[0]["shipName"].ToString(); //船名 HidComId.Value = data.Rows[0]["company"].ToString(); HidCusId.Value = data.Rows[0]["customer"].ToString(); HidTypeId.Value = data.Rows[0]["ProdTypeNo"].ToString(); HidSalesman.Value = data.Rows[0]["salesman"].ToString(); this.DdlIsVirify.SelectedValue = data.Rows[0]["ruleid"].ToString(); //审核规则 LoadAuditImg(int.Parse(data.Rows[0]["ruleid"].ToString())); DdlIsDaidian.SelectedValue = data.Rows[0]["isDaidian"].ToString(); LoginInfo userInfo = LoginInfoManager.getLoginInfoById(Convert.ToInt32(data.Rows[0]["policy_makerId"])); if (userInfo != null) { DepartmentInfo department = DepartmentInfoManager.getDepartmentInfoById(userInfo.Departid); if (department != null) { txtMarkerDepart.Text = department.Departcname; } } InitProductType(id); TxtSerialNum.Attributes.Add("ReadOnly", "true"); TxtPolicyMaker.Attributes.Add("ReadOnly", "true"); //初始化盈亏测算数据 UCBudgetEdit1.InitBudgetData(id); UCTarget1.BindTarget(id); LoadFileList(id); } else { Response.End(); } }
private void InitData(int policyID) { EtNet_Models.To_PolicyBudget budget = To_PolicyBudgetManager.GetBudgetByPolicy(policyID); if (budget == null) { return; } To_Policy policy = To_PolicyManager.getTo_PolicyById(policyID); if (policy.IsDaidian == 1) { TxtExpPremium.Text = budget.Exp_premium.GetStringValue(); //代垫保费 } TxtPremium.Text = budget.Income_premium.GetStringValue(); //保费 TxtJjfsj.Text = budget.Exp_brokerageFeesTaxes.GetStringValue(); //经纪费税金 TxtJjfsjMark.Text = budget.Exp_brokerageFeesTaxesMark; //经纪费税金备注 TxtJjfsjRatio.Text = budget.Exp_brokerageFeesTaxesRatio.GetStringValue(); //经纪费税金比率 TxtYj.Text = budget.Exp_commission.GetStringValue(); //佣金 TxtYjMark.Text = budget.Exp_commissionMark; //佣金备注 TxtYjRatio.Text = budget.Exp_commissionRatio.GetStringValue(); //佣金比率 TxtZxf.Text = budget.Exp_consultingFees.GetStringValue(); //咨询费 TxtZxfmark.Text = budget.Exp_consultingFeesMark; //咨询费备注 TxtZxfRatio.Text = budget.Exp_consultingFeesRatio.GetStringValue(); //咨询费比率 //TxtDklx.Text = budget.Exp_interest.GetStringValue();//垫款利息 TxtDklxMark.Text = budget.Exp_interestMark; //垫款利息备注 TxtDklxRatio1.Text = budget.Exp_interestRatio1.GetStringValue(); //垫款利息比率1 TxtDklxRatio2.Text = budget.Exp_interestRatio2.GetStringValue(); //垫款利息比率2 TxtGlf.Text = budget.Exp_managementFees.GetStringValue(); //管理费 TxtGlfMark.Text = budget.Exp_managementFeesMark; //管理费备注 TxtGlfRatio.Text = budget.Exp_managementFeesRatio.GetStringValue(); //管理费比率 TxtExpOther1.Text = budget.Exp_other1.GetStringValue(); //其它支出项1 TxtExpOther1Mark.Text = budget.Exp_other1Mark; //其它支出项1备注 TxtExpOther1Ratio.Text = budget.Exp_other1Ratio.GetStringValue(); //其它支出项1比率 TxtExpOther2.Text = budget.Exp_other2.GetStringValue(); //其它支出项2 TxtExpOther2Mark.Text = budget.Exp_other2Mark; //其它支出项2备注 TxtExpOther2Ratio.Text = budget.Exp_other2Ratio.GetStringValue(); //其它支出项2比率 TxtExpOther3.Text = budget.Exp_other3.GetStringValue(); //其它支出项3 TxtExpOther3Mark.Text = budget.Exp_other3Mark; //其它支出项3备注 TxtExpOther3Ratio.Text = budget.Exp_other3Ratio.GetStringValue(); //其它支出项3比率 TxtExpOther4.Text = budget.Exp_other4.GetStringValue(); //其它支出项4 TxtExpOther4Mark.Text = budget.Exp_other4Mark; //其它支出项4备注 TxtExpOther4Ratio.Text = budget.Exp_other4Ratio.GetStringValue(); //其它支出项4比率 TxtExpOther5.Text = budget.Exp_other5.GetStringValue(); //其它支出项5 TxtExpOther5Mark.Text = budget.Exp_other5Mark; //其它支出项5备注 TxtExpOther5Ratio.Text = budget.Exp_other5Ratio.GetStringValue(); //其它支出项5比率 TxtOther.Text = budget.Exp_otherTaxes.GetStringValue(); //其它税金 TxtOtherRatio.Text = budget.Exp_otherTaxesRatio.GetStringValue(); //其它税金比率 TxtOtherMark.Text = budget.Exp_otherTaxesRatioMark; //其它税金备注 TxtFwf.Text = budget.Exp_serviceCharge.GetStringValue(); //服务费 TxtFwfMark.Text = budget.Exp_serviceChargeMark; //服务费备注 TxtFwfRatio.Text = budget.Exp_serviceChargeRatio.GetStringValue(); //服务费比率 TxtFwfsj.Text = budget.Exp_serviceChargeTaxes.GetStringValue(); //服务费税金 TxtFwfsjMark.Text = budget.Exp_serviceChargeTaxesMark; //服务费税金备注 TxtFwfsjRatio.Text = budget.Exp_serviceChargeTaxesRatio.GetStringValue(); //服务费税金比率 TxtTf.Text = budget.Exp_tiefei.GetStringValue(); //贴费 TxtTfMark.Text = budget.Exp_tiefeiMark; //贴费备注 TxtTfRatio.Text = budget.Exp_tiefeiRatio.GetStringValue(); //贴费比率 //---------------------收入项 TxtBrokerage.Text = budget.Income_brokerageFees.GetStringValue(); //经纪费 TxtBrokerageMark.Text = budget.Income_brokerageFeesMark; //经纪费备注 TxtIncomeOther1.Text = budget.Income_other1.GetStringValue(); //其它收入项1 TxtIncomeOther1Mark.Text = budget.Income_other1Mark; //其它收入项1备注 TxtIncomeOther2.Text = budget.Income_other2.GetStringValue(); //其它收入项2 TxtIncomeOther2Mark.Text = budget.Income_other2Mark; //其它收入项2备注 TxtIncomeOther3.Text = budget.Income_other3.GetStringValue(); //其它收入项3 TxtIncomeOther3Mark.Text = budget.Income_other3Mark; //其它收入项3备注 TxtIncomeOther4.Text = budget.Income_other4.GetStringValue(); //其它收入项4 TxtIncomeOther4Mark.Text = budget.Income_other4Mark; //其它收入项4备注 TxtIncomeOther5.Text = budget.Income_other5.GetStringValue(); //其它收入项5 TxtIncomeOther5Mark.Text = budget.Income_other5Mark; //其它收入项5备注 TxtIncomeOther6.Text = budget.Income_other6.GetStringValue(); //其它收入项6 TxtIncomeOther6Mark.Text = budget.Income_other6Mark; //其它收入项6备注 TxtIncomeOther7.Text = budget.Income_other7.GetStringValue(); //其它收入项7 TxtIncomeOther7Mark.Text = budget.Income_other7Mark; //其它收入项7备注 TxtIncomeOther8.Text = budget.Income_other8.GetStringValue(); //其它收入项8 TxtIncomeOther8Mark.Text = budget.Income_other8Mark; //其它收入项8备注 TxtIncomeOther9.Text = budget.Income_other9.GetStringValue(); //其它收入项9 TxtIncomeOther9Mark.Text = budget.Income_other9Mark; //其它收入项9备注 TxtIncomeOther10.Text = budget.Income_other10.GetStringValue(); //其它收入项10 TxtIncomeOther10Mark.Text = budget.Income_other10Mark; //其它收入项10备注 TxtPremiunMark.Text = budget.Income_premiumMark; //保费备注 TxtService.Text = budget.Income_serviceCharge.GetStringValue(); //服务费 TxtServiceMark.Text = budget.Income_serviceChargeMark; //服务费备注 TxtExpPremiumMark.Text = budget.Exp_premiumMark; }