public Sunshine() { InitializeComponent(); this.xmlname = "SunShine"; if (!checkxmlfile()) { Dispose(); } this.insuranceType = "B07";//B07 阳光 this.insuranceNumberLength = 10; this.paperHeight = 400; this.paperWidth = 932; this.bhyx = false; //保存enumberHead FileStream fs = new FileStream(GlobalVar.s_configfile, FileMode.Open, FileAccess.ReadWrite); StreamReader sr = new StreamReader(fs, Encoding.Default); string temp = sr.ReadToEnd(); sr.Close(); fs.Close(); XmlDocument xd = new XmlDocument(); xd.LoadXml(temp); XmlNode xn = xd.SelectSingleNode("eg").SelectSingleNode(xmlname).SelectSingleNode("ENumberHead"); xn.InnerText = "0130705"; xd.Save(GlobalVar.s_configfile); // this.Text = "阳光财险打印"; cfg_insurance cc = new cfg_insurance(); cc.GetConfig(this.xmlname); //013070508 this.eNumberHead = cc.ENumberHead + EagleAPI.GetRandom01(DateTime.Now.Minute) + EagleAPI.GetRandom01(DateTime.Now.Second) + EagleAPI.GetRandom01(DateTime.Now.Millisecond); //this.eNumberHead = "013070508" + EagleAPI.GetRandom01(); this.tb经办人.Text = cc.Signature; this.numericUpDown1.Value = cc.OffsetX; this.numericUpDown2.Value = cc.OffsetY; this.tb保单序号.Text = cc.SaveNo; this.tb报案电话.Text = cc.Phone; this.tb填开单位.Text = cc.CompanyAddr; tb填开日期.Text = System.DateTime.Now.ToString(); this.cb险种条款.Text = "阳光交通工具乘客意外伤害保险条款"; timer1.Start(); retstring = ""; b_opened = true; connect_4_Command.PrintWindowOpen = true; context = this; this.ActiveControl = this.tbPnr; }
public Hangyiwang() { InitializeComponent(); this.xmlname = "Hangyiwang"; if (!checkxmlfile()) { Dispose(); } this.insuranceType = "B08";//B08 航翼网 this.insuranceNumberLength = 8; this.paperHeight = 400; this.paperWidth = 932; this.bhyx = false; //保存enumberHead FileStream fs = new FileStream(GlobalVar.s_configfile, FileMode.Open, FileAccess.ReadWrite); StreamReader sr = new StreamReader(fs, Encoding.Default); string temp = sr.ReadToEnd(); sr.Close(); fs.Close(); XmlDocument xd = new XmlDocument(); xd.LoadXml(temp); XmlNode xn = xd.SelectSingleNode("eg").SelectSingleNode(xmlname).SelectSingleNode("ENumberHead"); xn.InnerText = "HYW";//未设置电子保单号头部 xd.Save(GlobalVar.s_configfile); // cfg_insurance cc = new cfg_insurance(); cc.GetConfig(this.xmlname); this.eNumberHead = cc.ENumberHead; //+ EagleAPI.GetRandom01(DateTime.Now.Minute) //+ EagleAPI.GetRandom01(DateTime.Now.Second) //+ EagleAPI.GetRandom01(DateTime.Now.Millisecond); this.tb经办人.Text = cc.Signature; this.numericUpDown1.Value = cc.OffsetX; this.numericUpDown2.Value = cc.OffsetY; this.tb保单序号.Text = cc.SaveNo; tb填开日期.Text = System.DateTime.Now.ToShortDateString(); retstring = ""; b_opened = true; connect_4_Command.PrintWindowOpen = true; context = this; this.ActiveControl = this.tbPnr; }
private void bt_SetToDefault_Click(object sender, EventArgs e) { if (xmlname == "") { MessageBox.Show("未设置保险配置的xmlname"); return; } Default yd = new Default(); yd.xmlFirst = xmlname; if (DialogResult.OK == yd.ShowDialog()) { cfg_insurance cfg = new cfg_insurance(); cfg.GetConfig(xmlname); eNumberHead = cfg.ENumberHead; tb经办人.Text = cfg.Signature; numericUpDown1.Value = cfg.OffsetX; numericUpDown2.Value = cfg.OffsetY; tb保单序号.Text = cfg.SaveNo; } }
public Pacific() { InitializeComponent(); try { LogoPicture.pictures pic = new LogoPicture.pictures(); this.imgLogo.Image = pic.pictureBox8.Image; lb公司名称.Text = "中国太平洋财产保险股份有限公司"; lb保单标题.Text = "航空旅客人身意外伤害保险保险单"; this.Text = "打印 太平洋-航空意外伤害保险"; } catch { } this.xmlname = "Pacific"; if (!checkxmlfile()) { Dispose(); } this.insuranceType = "B0A";//B09 Eagle保险卡 this.insuranceNumberLength = 10; this.paperHeight = 400; this.paperWidth = 949; this.bhyx = false; //保存enumberHead FileStream fs = new FileStream(GlobalVar.s_configfile, FileMode.Open, FileAccess.ReadWrite); StreamReader sr = new StreamReader(fs, Encoding.Default); string temp = sr.ReadToEnd(); sr.Close(); fs.Close(); XmlDocument xd = new XmlDocument(); xd.LoadXml(temp); XmlNode xn = xd.SelectSingleNode("eg").SelectSingleNode(xmlname).SelectSingleNode("ENumberHead"); xn.InnerText = "";//未设置电子保单号头部 xd.Save(GlobalVar.s_configfile); // cfg_insurance cc = new cfg_insurance(); cc.GetConfig(this.xmlname); this.eNumberHead = cc.ENumberHead; //+ EagleAPI.GetRandom01(DateTime.Now.Minute) //+ EagleAPI.GetRandom01(DateTime.Now.Second) //+ EagleAPI.GetRandom01(DateTime.Now.Millisecond); this.tb经办人.Text = cc.Signature; this.numericUpDown1.Value = cc.OffsetX; this.numericUpDown2.Value = cc.OffsetY; this.tb保单序号.Text = cc.SaveNo; tb填开日期.Text = System.DateTime.Now.ToShortDateString(); retstring = ""; b_opened = true; connect_4_Command.PrintWindowOpen = true; context = this; this.ActiveControl = this.tbPnr; }
public int EalgeBxtype = 1;//0:新华 1:PICC public EagleIns() { InitializeComponent(); GlobalVar2.bxTelephone = textBox1.Text; switch (this.EalgeBxtype) { case 0: this.xmlname = "EagleIns"; this.insuranceType = "B09";//B09 Eagle保险卡新华 this.insuranceNumberLength = 12; break; case 1: this.xmlname = "EagleIns2"; this.insuranceType = "B0D";//B0D Eagle保险卡PICC this.insuranceNumberLength = 12; break; } if (!checkxmlfile()) { Dispose(); } this.paperHeight = 400; this.paperWidth = 949; this.bhyx = false; //保存enumberHead FileStream fs = new FileStream(GlobalVar.s_configfile, FileMode.Open, FileAccess.ReadWrite); StreamReader sr = new StreamReader(fs, Encoding.Default); string temp = sr.ReadToEnd(); sr.Close(); fs.Close(); XmlDocument xd = new XmlDocument(); xd.LoadXml(temp); XmlNode xn = xd.SelectSingleNode("eg").SelectSingleNode(xmlname).SelectSingleNode("ENumberHead"); xn.InnerText = "EAGLE";//未设置电子保单号头部 xd.Save(GlobalVar.s_configfile); // cfg_insurance cc = new cfg_insurance(); cc.GetConfig(this.xmlname); this.eNumberHead = cc.ENumberHead; //+ EagleAPI.GetRandom01(DateTime.Now.Minute) //+ EagleAPI.GetRandom01(DateTime.Now.Second) //+ EagleAPI.GetRandom01(DateTime.Now.Millisecond); this.tb经办人.Text = cc.Signature; this.numericUpDown1.Value = cc.OffsetX; this.numericUpDown2.Value = cc.OffsetY; this.tb保单序号.Text = cc.SaveNo; tb填开日期.Text = System.DateTime.Now.ToShortDateString(); retstring = ""; b_opened = true; connect_4_Command.PrintWindowOpen = true; context = this; this.ActiveControl = this.tbPnr; if (GlobalVar2.bTempus) { lb保单标题.Text = "商务会员信息卡"; } }