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; }