frmInvoice.cs
上传用户:jx_fiona
上传日期:2014-03-08
资源大小:1387k
文件大小:47k
源码类别:

打印编程

开发平台:

Others

  1. using System;
  2. using System.Drawing;
  3. using System.Collections;
  4. using System.ComponentModel;
  5. using System.Windows.Forms;
  6. namespace MisGoldPrinterTest
  7. {
  8. /// <summary>
  9. /// 套打经典样例
  10. /// </summary>
  11. public class frmInvoice : System.Windows.Forms.Form
  12. {
  13. #region Windows 窗体设计器生成的代码
  14. private System.Windows.Forms.Label label1;
  15. private System.Windows.Forms.Label label2;
  16. private System.Windows.Forms.Label label3;
  17. private System.Windows.Forms.Label label4;
  18. private System.Windows.Forms.TextBox txtInvoiceCode;
  19. private System.Windows.Forms.TextBox txtInvoiceSerialNo;
  20. private System.Windows.Forms.Panel panel1;
  21. private System.Windows.Forms.TextBox txtYear;
  22. private System.Windows.Forms.TextBox txtMonth;
  23. private System.Windows.Forms.TextBox txtDay;
  24. private System.Windows.Forms.Label label5;
  25. private System.Windows.Forms.Label label6;
  26. private System.Windows.Forms.Label label7;
  27. private System.Windows.Forms.Label label8;
  28. private System.Windows.Forms.Label label9;
  29. private System.Windows.Forms.Label label10;
  30. private System.Windows.Forms.Label label11;
  31. private System.Windows.Forms.Label label12;
  32. private System.Windows.Forms.Label label13;
  33. private System.Windows.Forms.Label label17;
  34. private System.Windows.Forms.PictureBox pictureBox1;
  35. private System.Windows.Forms.Label label29;
  36. private System.Windows.Forms.Label label30;
  37. private System.Windows.Forms.Label label31;
  38. private System.Windows.Forms.Label label32;
  39. private System.Windows.Forms.Label label33;
  40. private System.Windows.Forms.Label label34;
  41. private System.Windows.Forms.Label label14;
  42. private System.Windows.Forms.Label label15;
  43. private System.Windows.Forms.Label label16;
  44. private System.Windows.Forms.Label label18;
  45. private System.Windows.Forms.Label label19;
  46. private System.Windows.Forms.Label label20;
  47. private System.Windows.Forms.Label label21;
  48. private System.Windows.Forms.Label label22;
  49. private System.Windows.Forms.Label label23;
  50. private System.Windows.Forms.TextBox txtPayer;
  51. private System.Windows.Forms.TextBox txtCollecter;
  52. private System.Windows.Forms.TextBox txtCollecterAddTel;
  53. private System.Windows.Forms.TextBox txtInvoiceApplicationNo;
  54. private System.Windows.Forms.TextBox txtCollecterID;
  55. private System.Windows.Forms.TextBox txtMemo;
  56. private System.Windows.Forms.TextBox txtP1;
  57. private System.Windows.Forms.TextBox txtJ1;
  58. private System.Windows.Forms.TextBox txtJ2;
  59. private System.Windows.Forms.TextBox txtP2;
  60. private System.Windows.Forms.TextBox txtJ4;
  61. private System.Windows.Forms.TextBox txtP4;
  62. private System.Windows.Forms.TextBox txtJ3;
  63. private System.Windows.Forms.TextBox txtP3;
  64. private System.Windows.Forms.TextBox txtJ8;
  65. private System.Windows.Forms.TextBox txtP8;
  66. private System.Windows.Forms.TextBox txtJ7;
  67. private System.Windows.Forms.TextBox txtP7;
  68. private System.Windows.Forms.TextBox txtJ6;
  69. private System.Windows.Forms.TextBox txtP6;
  70. private System.Windows.Forms.TextBox txtJ5;
  71. private System.Windows.Forms.TextBox txtP5;
  72. private System.Windows.Forms.TextBox txtJ10;
  73. private System.Windows.Forms.TextBox txtP10;
  74. private System.Windows.Forms.TextBox txtJ9;
  75. private System.Windows.Forms.TextBox txtP9;
  76. private System.Windows.Forms.TextBox txtTotalUpper;
  77. private System.Windows.Forms.TextBox txtTotalLower;
  78. private System.Windows.Forms.TextBox txtTaxUpper;
  79. private System.Windows.Forms.TextBox txtTaxLower;
  80. private System.Windows.Forms.TextBox txtTaxControlCode;
  81. private System.Windows.Forms.TextBox txtWriter;
  82. private System.Windows.Forms.Button btnExit;
  83. private System.Windows.Forms.Button btnPrint;
  84. private System.Windows.Forms.Button btnPreview;
  85. private System.Windows.Forms.Button btnCasePrint;
  86. private System.Windows.Forms.Button btnRefDate;
  87. private System.Windows.Forms.MonthCalendar cldSelect;
  88. private System.Windows.Forms.ComboBox cboTaxRate;
  89. private System.Windows.Forms.Label label24;
  90. /// <summary>
  91. /// 必需的设计器变量。
  92. /// </summary>
  93. private System.ComponentModel.Container components = null;
  94. public frmInvoice()
  95. {
  96. //
  97. // Windows 窗体设计器支持所必需的
  98. //
  99. InitializeComponent();
  100. //
  101. // TODO: 在 InitializeComponent 调用后添加任何构造函数代码
  102. //
  103. }
  104. /// <summary>
  105. /// 清理所有正在使用的资源。
  106. /// </summary>
  107. protected override void Dispose( bool disposing )
  108. {
  109. if( disposing )
  110. {
  111. if(components != null)
  112. {
  113. components.Dispose();
  114. }
  115. }
  116. base.Dispose( disposing );
  117. }
  118. /// <summary>
  119. /// 设计器支持所需的方法 - 不要使用代码编辑器修改
  120. /// 此方法的内容。
  121. /// </summary>
  122. private void InitializeComponent()
  123. {
  124. this.label1 = new System.Windows.Forms.Label();
  125. this.label2 = new System.Windows.Forms.Label();
  126. this.label3 = new System.Windows.Forms.Label();
  127. this.label4 = new System.Windows.Forms.Label();
  128. this.txtInvoiceCode = new System.Windows.Forms.TextBox();
  129. this.txtInvoiceSerialNo = new System.Windows.Forms.TextBox();
  130. this.panel1 = new System.Windows.Forms.Panel();
  131. this.cboTaxRate = new System.Windows.Forms.ComboBox();
  132. this.label24 = new System.Windows.Forms.Label();
  133. this.txtTaxLower = new System.Windows.Forms.TextBox();
  134. this.txtTotalLower = new System.Windows.Forms.TextBox();
  135. this.label20 = new System.Windows.Forms.Label();
  136. this.label21 = new System.Windows.Forms.Label();
  137. this.label19 = new System.Windows.Forms.Label();
  138. this.txtTaxUpper = new System.Windows.Forms.TextBox();
  139. this.label18 = new System.Windows.Forms.Label();
  140. this.txtTotalUpper = new System.Windows.Forms.TextBox();
  141. this.label16 = new System.Windows.Forms.Label();
  142. this.label15 = new System.Windows.Forms.Label();
  143. this.label14 = new System.Windows.Forms.Label();
  144. this.txtMemo = new System.Windows.Forms.TextBox();
  145. this.txtJ10 = new System.Windows.Forms.TextBox();
  146. this.txtP10 = new System.Windows.Forms.TextBox();
  147. this.txtJ9 = new System.Windows.Forms.TextBox();
  148. this.txtP9 = new System.Windows.Forms.TextBox();
  149. this.txtJ8 = new System.Windows.Forms.TextBox();
  150. this.txtP8 = new System.Windows.Forms.TextBox();
  151. this.txtJ7 = new System.Windows.Forms.TextBox();
  152. this.txtP7 = new System.Windows.Forms.TextBox();
  153. this.txtJ6 = new System.Windows.Forms.TextBox();
  154. this.txtP6 = new System.Windows.Forms.TextBox();
  155. this.txtJ5 = new System.Windows.Forms.TextBox();
  156. this.txtP5 = new System.Windows.Forms.TextBox();
  157. this.txtJ4 = new System.Windows.Forms.TextBox();
  158. this.txtP4 = new System.Windows.Forms.TextBox();
  159. this.txtJ3 = new System.Windows.Forms.TextBox();
  160. this.txtP3 = new System.Windows.Forms.TextBox();
  161. this.txtJ2 = new System.Windows.Forms.TextBox();
  162. this.txtP2 = new System.Windows.Forms.TextBox();
  163. this.txtJ1 = new System.Windows.Forms.TextBox();
  164. this.txtP1 = new System.Windows.Forms.TextBox();
  165. this.label34 = new System.Windows.Forms.Label();
  166. this.label33 = new System.Windows.Forms.Label();
  167. this.txtCollecterID = new System.Windows.Forms.TextBox();
  168. this.txtInvoiceApplicationNo = new System.Windows.Forms.TextBox();
  169. this.label31 = new System.Windows.Forms.Label();
  170. this.label32 = new System.Windows.Forms.Label();
  171. this.label29 = new System.Windows.Forms.Label();
  172. this.label30 = new System.Windows.Forms.Label();
  173. this.txtCollecterAddTel = new System.Windows.Forms.TextBox();
  174. this.txtCollecter = new System.Windows.Forms.TextBox();
  175. this.txtPayer = new System.Windows.Forms.TextBox();
  176. this.pictureBox1 = new System.Windows.Forms.PictureBox();
  177. this.label17 = new System.Windows.Forms.Label();
  178. this.label13 = new System.Windows.Forms.Label();
  179. this.label12 = new System.Windows.Forms.Label();
  180. this.label11 = new System.Windows.Forms.Label();
  181. this.label10 = new System.Windows.Forms.Label();
  182. this.label9 = new System.Windows.Forms.Label();
  183. this.label8 = new System.Windows.Forms.Label();
  184. this.txtYear = new System.Windows.Forms.TextBox();
  185. this.txtMonth = new System.Windows.Forms.TextBox();
  186. this.txtDay = new System.Windows.Forms.TextBox();
  187. this.label5 = new System.Windows.Forms.Label();
  188. this.label6 = new System.Windows.Forms.Label();
  189. this.label7 = new System.Windows.Forms.Label();
  190. this.label22 = new System.Windows.Forms.Label();
  191. this.label23 = new System.Windows.Forms.Label();
  192. this.txtTaxControlCode = new System.Windows.Forms.TextBox();
  193. this.txtWriter = new System.Windows.Forms.TextBox();
  194. this.btnPrint = new System.Windows.Forms.Button();
  195. this.btnPreview = new System.Windows.Forms.Button();
  196. this.btnExit = new System.Windows.Forms.Button();
  197. this.btnCasePrint = new System.Windows.Forms.Button();
  198. this.btnRefDate = new System.Windows.Forms.Button();
  199. this.cldSelect = new System.Windows.Forms.MonthCalendar();
  200. this.panel1.SuspendLayout();
  201. this.SuspendLayout();
  202. // 
  203. // label1
  204. // 
  205. this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
  206. | System.Windows.Forms.AnchorStyles.Right)));
  207. this.label1.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
  208. this.label1.Location = new System.Drawing.Point(8, 2);
  209. this.label1.Name = "label1";
  210. this.label1.Size = new System.Drawing.Size(776, 32);
  211. this.label1.TabIndex = 0;
  212. this.label1.Text = "税 务 机 关 代 开 统 一 发 票(国 税)";
  213. this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
  214. // 
  215. // label2
  216. // 
  217. this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
  218. | System.Windows.Forms.AnchorStyles.Right)));
  219. this.label2.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
  220. this.label2.Location = new System.Drawing.Point(8, 28);
  221. this.label2.Name = "label2";
  222. this.label2.Size = new System.Drawing.Size(776, 32);
  223. this.label2.TabIndex = 1;
  224. this.label2.Text = "记  账  联";
  225. this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
  226. // 
  227. // label3
  228. // 
  229. this.label3.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
  230. | System.Windows.Forms.AnchorStyles.Right)));
  231. this.label3.Location = new System.Drawing.Point(528, 38);
  232. this.label3.Name = "label3";
  233. this.label3.Size = new System.Drawing.Size(124, 23);
  234. this.label3.TabIndex = 2;
  235. this.label3.Text = "发票代码:";
  236. // 
  237. // label4
  238. // 
  239. this.label4.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
  240. | System.Windows.Forms.AnchorStyles.Right)));
  241. this.label4.Location = new System.Drawing.Point(528, 62);
  242. this.label4.Name = "label4";
  243. this.label4.Size = new System.Drawing.Size(124, 23);
  244. this.label4.TabIndex = 3;
  245. this.label4.Text = "发票号码:";
  246. // 
  247. // txtInvoiceCode
  248. // 
  249. this.txtInvoiceCode.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
  250. | System.Windows.Forms.AnchorStyles.Right)));
  251. this.txtInvoiceCode.Location = new System.Drawing.Point(592, 34);
  252. this.txtInvoiceCode.Name = "txtInvoiceCode";
  253. this.txtInvoiceCode.Size = new System.Drawing.Size(184, 21);
  254. this.txtInvoiceCode.TabIndex = 0;
  255. this.txtInvoiceCode.Text = "";
  256. // 
  257. // txtInvoiceSerialNo
  258. // 
  259. this.txtInvoiceSerialNo.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
  260. | System.Windows.Forms.AnchorStyles.Right)));
  261. this.txtInvoiceSerialNo.Location = new System.Drawing.Point(592, 58);
  262. this.txtInvoiceSerialNo.Name = "txtInvoiceSerialNo";
  263. this.txtInvoiceSerialNo.Size = new System.Drawing.Size(184, 21);
  264. this.txtInvoiceSerialNo.TabIndex = 1;
  265. this.txtInvoiceSerialNo.Text = "";
  266. // 
  267. // panel1
  268. // 
  269. this.panel1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
  270. | System.Windows.Forms.AnchorStyles.Right)));
  271. this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
  272. this.panel1.Controls.Add(this.cboTaxRate);
  273. this.panel1.Controls.Add(this.label24);
  274. this.panel1.Controls.Add(this.txtTaxLower);
  275. this.panel1.Controls.Add(this.txtTotalLower);
  276. this.panel1.Controls.Add(this.label20);
  277. this.panel1.Controls.Add(this.label21);
  278. this.panel1.Controls.Add(this.label19);
  279. this.panel1.Controls.Add(this.txtTaxUpper);
  280. this.panel1.Controls.Add(this.label18);
  281. this.panel1.Controls.Add(this.txtTotalUpper);
  282. this.panel1.Controls.Add(this.label16);
  283. this.panel1.Controls.Add(this.label15);
  284. this.panel1.Controls.Add(this.label14);
  285. this.panel1.Controls.Add(this.txtMemo);
  286. this.panel1.Controls.Add(this.txtJ10);
  287. this.panel1.Controls.Add(this.txtP10);
  288. this.panel1.Controls.Add(this.txtJ9);
  289. this.panel1.Controls.Add(this.txtP9);
  290. this.panel1.Controls.Add(this.txtJ8);
  291. this.panel1.Controls.Add(this.txtP8);
  292. this.panel1.Controls.Add(this.txtJ7);
  293. this.panel1.Controls.Add(this.txtP7);
  294. this.panel1.Controls.Add(this.txtJ6);
  295. this.panel1.Controls.Add(this.txtP6);
  296. this.panel1.Controls.Add(this.txtJ5);
  297. this.panel1.Controls.Add(this.txtP5);
  298. this.panel1.Controls.Add(this.txtJ4);
  299. this.panel1.Controls.Add(this.txtP4);
  300. this.panel1.Controls.Add(this.txtJ3);
  301. this.panel1.Controls.Add(this.txtP3);
  302. this.panel1.Controls.Add(this.txtJ2);
  303. this.panel1.Controls.Add(this.txtP2);
  304. this.panel1.Controls.Add(this.txtJ1);
  305. this.panel1.Controls.Add(this.txtP1);
  306. this.panel1.Controls.Add(this.label34);
  307. this.panel1.Controls.Add(this.label33);
  308. this.panel1.Controls.Add(this.txtCollecterID);
  309. this.panel1.Controls.Add(this.txtInvoiceApplicationNo);
  310. this.panel1.Controls.Add(this.label31);
  311. this.panel1.Controls.Add(this.label32);
  312. this.panel1.Controls.Add(this.label29);
  313. this.panel1.Controls.Add(this.label30);
  314. this.panel1.Controls.Add(this.txtCollecterAddTel);
  315. this.panel1.Controls.Add(this.txtCollecter);
  316. this.panel1.Controls.Add(this.txtPayer);
  317. this.panel1.Controls.Add(this.pictureBox1);
  318. this.panel1.Controls.Add(this.label17);
  319. this.panel1.Controls.Add(this.label13);
  320. this.panel1.Controls.Add(this.label12);
  321. this.panel1.Controls.Add(this.label11);
  322. this.panel1.Controls.Add(this.label10);
  323. this.panel1.Controls.Add(this.label9);
  324. this.panel1.Controls.Add(this.label8);
  325. this.panel1.Location = new System.Drawing.Point(4, 92);
  326. this.panel1.Name = "panel1";
  327. this.panel1.Size = new System.Drawing.Size(784, 390);
  328. this.panel1.TabIndex = 6;
  329. // 
  330. // cboTaxRate
  331. // 
  332. this.cboTaxRate.Items.AddRange(new object[] {
  333. "7",
  334. "13",
  335. "15",
  336. "17"});
  337. this.cboTaxRate.Location = new System.Drawing.Point(616, 306);
  338. this.cboTaxRate.Name = "cboTaxRate";
  339. this.cboTaxRate.Size = new System.Drawing.Size(52, 20);
  340. this.cboTaxRate.TabIndex = 27;
  341. this.cboTaxRate.TabStop = false;
  342. this.cboTaxRate.Text = "7";
  343. this.cboTaxRate.TextChanged += new System.EventHandler(this.cboTaxRate_TextChanged);
  344. // 
  345. // label24
  346. // 
  347. this.label24.Location = new System.Drawing.Point(538, 306);
  348. this.label24.Name = "label24";
  349. this.label24.Size = new System.Drawing.Size(88, 22);
  350. this.label24.TabIndex = 68;
  351. this.label24.Text = "税率设置(%):";
  352. this.label24.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
  353. // 
  354. // txtTaxLower
  355. // 
  356. this.txtTaxLower.Location = new System.Drawing.Point(618, 362);
  357. this.txtTaxLower.Name = "txtTaxLower";
  358. this.txtTaxLower.Size = new System.Drawing.Size(158, 21);
  359. this.txtTaxLower.TabIndex = 31;
  360. this.txtTaxLower.Text = "";
  361. // 
  362. // txtTotalLower
  363. // 
  364. this.txtTotalLower.Location = new System.Drawing.Point(618, 336);
  365. this.txtTotalLower.Name = "txtTotalLower";
  366. this.txtTotalLower.Size = new System.Drawing.Size(158, 21);
  367. this.txtTotalLower.TabIndex = 29;
  368. this.txtTotalLower.Text = "";
  369. this.txtTotalLower.KeyUp += new System.Windows.Forms.KeyEventHandler(this.txtTotalLower_KeyUp);
  370. // 
  371. // label20
  372. // 
  373. this.label20.Location = new System.Drawing.Point(534, 362);
  374. this.label20.Name = "label20";
  375. this.label20.Size = new System.Drawing.Size(80, 18);
  376. this.label20.TabIndex = 63;
  377. this.label20.Text = "完税凭证号码";
  378. this.label20.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
  379. // 
  380. // label21
  381. // 
  382. this.label21.Location = new System.Drawing.Point(534, 336);
  383. this.label21.Name = "label21";
  384. this.label21.Size = new System.Drawing.Size(80, 18);
  385. this.label21.TabIndex = 62;
  386. this.label21.Text = "(小写)";
  387. this.label21.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
  388. // 
  389. // label19
  390. // 
  391. this.label19.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
  392. | System.Windows.Forms.AnchorStyles.Right)));
  393. this.label19.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
  394. this.label19.Location = new System.Drawing.Point(6, 356);
  395. this.label19.Name = "label19";
  396. this.label19.Size = new System.Drawing.Size(768, 3);
  397. this.label19.TabIndex = 61;
  398. // 
  399. // txtTaxUpper
  400. // 
  401. this.txtTaxUpper.Location = new System.Drawing.Point(114, 360);
  402. this.txtTaxUpper.Name = "txtTaxUpper";
  403. this.txtTaxUpper.Size = new System.Drawing.Size(416, 21);
  404. this.txtTaxUpper.TabIndex = 30;
  405. this.txtTaxUpper.Text = "";
  406. // 
  407. // label18
  408. // 
  409. this.label18.Location = new System.Drawing.Point(6, 362);
  410. this.label18.Name = "label18";
  411. this.label18.Size = new System.Drawing.Size(104, 18);
  412. this.label18.TabIndex = 59;
  413. this.label18.Text = "税额(大写)";
  414. this.label18.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
  415. // 
  416. // txtTotalUpper
  417. // 
  418. this.txtTotalUpper.Location = new System.Drawing.Point(114, 334);
  419. this.txtTotalUpper.Name = "txtTotalUpper";
  420. this.txtTotalUpper.Size = new System.Drawing.Size(416, 21);
  421. this.txtTotalUpper.TabIndex = 28;
  422. this.txtTotalUpper.Text = "";
  423. // 
  424. // label16
  425. // 
  426. this.label16.Location = new System.Drawing.Point(6, 336);
  427. this.label16.Name = "label16";
  428. this.label16.Size = new System.Drawing.Size(104, 18);
  429. this.label16.TabIndex = 57;
  430. this.label16.Text = "合计人民币(大写)";
  431. this.label16.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
  432. // 
  433. // label15
  434. // 
  435. this.label15.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
  436. | System.Windows.Forms.AnchorStyles.Right)));
  437. this.label15.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
  438. this.label15.Location = new System.Drawing.Point(6, 328);
  439. this.label15.Name = "label15";
  440. this.label15.Size = new System.Drawing.Size(768, 3);
  441. this.label15.TabIndex = 56;
  442. // 
  443. // label14
  444. // 
  445. this.label14.Location = new System.Drawing.Point(666, 308);
  446. this.label14.Name = "label14";
  447. this.label14.Size = new System.Drawing.Size(102, 18);
  448. this.label14.TabIndex = 55;
  449. this.label14.Text = "代开单位盖章";
  450. this.label14.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
  451. // 
  452. // txtMemo
  453. // 
  454. this.txtMemo.Location = new System.Drawing.Point(538, 126);
  455. this.txtMemo.Multiline = true;
  456. this.txtMemo.Name = "txtMemo";
  457. this.txtMemo.ScrollBars = System.Windows.Forms.ScrollBars.Both;
  458. this.txtMemo.Size = new System.Drawing.Size(230, 178);
  459. this.txtMemo.TabIndex = 27;
  460. this.txtMemo.Text = "";
  461. // 
  462. // txtJ10
  463. // 
  464. this.txtJ10.Font = new System.Drawing.Font("宋体", 8F);
  465. this.txtJ10.Location = new System.Drawing.Point(440, 304);
  466. this.txtJ10.Name = "txtJ10";
  467. this.txtJ10.Size = new System.Drawing.Size(88, 20);
  468. this.txtJ10.TabIndex = 26;
  469. this.txtJ10.Text = "";
  470. this.txtJ10.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
  471. this.txtJ10.TextChanged += new System.EventHandler(this.txtJX_TextChanged);
  472. // 
  473. // txtP10
  474. // 
  475. this.txtP10.Font = new System.Drawing.Font("宋体", 8F);
  476. this.txtP10.Location = new System.Drawing.Point(6, 304);
  477. this.txtP10.Name = "txtP10";
  478. this.txtP10.Size = new System.Drawing.Size(430, 20);
  479. this.txtP10.TabIndex = 25;
  480. this.txtP10.Text = "";
  481. // 
  482. // txtJ9
  483. // 
  484. this.txtJ9.Font = new System.Drawing.Font("宋体", 8F);
  485. this.txtJ9.Location = new System.Drawing.Point(440, 284);
  486. this.txtJ9.Name = "txtJ9";
  487. this.txtJ9.Size = new System.Drawing.Size(88, 20);
  488. this.txtJ9.TabIndex = 24;
  489. this.txtJ9.Text = "";
  490. this.txtJ9.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
  491. this.txtJ9.TextChanged += new System.EventHandler(this.txtJX_TextChanged);
  492. // 
  493. // txtP9
  494. // 
  495. this.txtP9.Font = new System.Drawing.Font("宋体", 8F);
  496. this.txtP9.Location = new System.Drawing.Point(6, 284);
  497. this.txtP9.Name = "txtP9";
  498. this.txtP9.Size = new System.Drawing.Size(430, 20);
  499. this.txtP9.TabIndex = 23;
  500. this.txtP9.Text = "";
  501. // 
  502. // txtJ8
  503. // 
  504. this.txtJ8.Font = new System.Drawing.Font("宋体", 8F);
  505. this.txtJ8.Location = new System.Drawing.Point(440, 264);
  506. this.txtJ8.Name = "txtJ8";
  507. this.txtJ8.Size = new System.Drawing.Size(88, 20);
  508. this.txtJ8.TabIndex = 22;
  509. this.txtJ8.Text = "";
  510. this.txtJ8.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
  511. this.txtJ8.TextChanged += new System.EventHandler(this.txtJX_TextChanged);
  512. // 
  513. // txtP8
  514. // 
  515. this.txtP8.Font = new System.Drawing.Font("宋体", 8F);
  516. this.txtP8.Location = new System.Drawing.Point(6, 264);
  517. this.txtP8.Name = "txtP8";
  518. this.txtP8.Size = new System.Drawing.Size(430, 20);
  519. this.txtP8.TabIndex = 21;
  520. this.txtP8.Text = "";
  521. // 
  522. // txtJ7
  523. // 
  524. this.txtJ7.Font = new System.Drawing.Font("宋体", 8F);
  525. this.txtJ7.Location = new System.Drawing.Point(440, 244);
  526. this.txtJ7.Name = "txtJ7";
  527. this.txtJ7.Size = new System.Drawing.Size(88, 20);
  528. this.txtJ7.TabIndex = 20;
  529. this.txtJ7.Text = "";
  530. this.txtJ7.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
  531. this.txtJ7.TextChanged += new System.EventHandler(this.txtJX_TextChanged);
  532. // 
  533. // txtP7
  534. // 
  535. this.txtP7.Font = new System.Drawing.Font("宋体", 8F);
  536. this.txtP7.Location = new System.Drawing.Point(6, 244);
  537. this.txtP7.Name = "txtP7";
  538. this.txtP7.Size = new System.Drawing.Size(430, 20);
  539. this.txtP7.TabIndex = 19;
  540. this.txtP7.Text = "";
  541. // 
  542. // txtJ6
  543. // 
  544. this.txtJ6.Font = new System.Drawing.Font("宋体", 8F);
  545. this.txtJ6.Location = new System.Drawing.Point(440, 224);
  546. this.txtJ6.Name = "txtJ6";
  547. this.txtJ6.Size = new System.Drawing.Size(88, 20);
  548. this.txtJ6.TabIndex = 18;
  549. this.txtJ6.Text = "";
  550. this.txtJ6.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
  551. this.txtJ6.TextChanged += new System.EventHandler(this.txtJX_TextChanged);
  552. // 
  553. // txtP6
  554. // 
  555. this.txtP6.Font = new System.Drawing.Font("宋体", 8F);
  556. this.txtP6.Location = new System.Drawing.Point(6, 224);
  557. this.txtP6.Name = "txtP6";
  558. this.txtP6.Size = new System.Drawing.Size(430, 20);
  559. this.txtP6.TabIndex = 17;
  560. this.txtP6.Text = "";
  561. // 
  562. // txtJ5
  563. // 
  564. this.txtJ5.Font = new System.Drawing.Font("宋体", 8F);
  565. this.txtJ5.Location = new System.Drawing.Point(440, 204);
  566. this.txtJ5.Name = "txtJ5";
  567. this.txtJ5.Size = new System.Drawing.Size(88, 20);
  568. this.txtJ5.TabIndex = 16;
  569. this.txtJ5.Text = "";
  570. this.txtJ5.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
  571. this.txtJ5.TextChanged += new System.EventHandler(this.txtJX_TextChanged);
  572. // 
  573. // txtP5
  574. // 
  575. this.txtP5.Font = new System.Drawing.Font("宋体", 8F);
  576. this.txtP5.Location = new System.Drawing.Point(6, 204);
  577. this.txtP5.Name = "txtP5";
  578. this.txtP5.Size = new System.Drawing.Size(430, 20);
  579. this.txtP5.TabIndex = 15;
  580. this.txtP5.Text = "";
  581. // 
  582. // txtJ4
  583. // 
  584. this.txtJ4.Font = new System.Drawing.Font("宋体", 8F);
  585. this.txtJ4.Location = new System.Drawing.Point(440, 184);
  586. this.txtJ4.Name = "txtJ4";
  587. this.txtJ4.Size = new System.Drawing.Size(88, 20);
  588. this.txtJ4.TabIndex = 14;
  589. this.txtJ4.Text = "";
  590. this.txtJ4.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
  591. this.txtJ4.TextChanged += new System.EventHandler(this.txtJX_TextChanged);
  592. // 
  593. // txtP4
  594. // 
  595. this.txtP4.Font = new System.Drawing.Font("宋体", 8F);
  596. this.txtP4.Location = new System.Drawing.Point(6, 184);
  597. this.txtP4.Name = "txtP4";
  598. this.txtP4.Size = new System.Drawing.Size(430, 20);
  599. this.txtP4.TabIndex = 13;
  600. this.txtP4.Text = "";
  601. // 
  602. // txtJ3
  603. // 
  604. this.txtJ3.Font = new System.Drawing.Font("宋体", 8F);
  605. this.txtJ3.Location = new System.Drawing.Point(440, 164);
  606. this.txtJ3.Name = "txtJ3";
  607. this.txtJ3.Size = new System.Drawing.Size(88, 20);
  608. this.txtJ3.TabIndex = 12;
  609. this.txtJ3.Text = "";
  610. this.txtJ3.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
  611. this.txtJ3.TextChanged += new System.EventHandler(this.txtJX_TextChanged);
  612. // 
  613. // txtP3
  614. // 
  615. this.txtP3.Font = new System.Drawing.Font("宋体", 8F);
  616. this.txtP3.Location = new System.Drawing.Point(6, 164);
  617. this.txtP3.Name = "txtP3";
  618. this.txtP3.Size = new System.Drawing.Size(430, 20);
  619. this.txtP3.TabIndex = 11;
  620. this.txtP3.Text = "";
  621. // 
  622. // txtJ2
  623. // 
  624. this.txtJ2.Font = new System.Drawing.Font("宋体", 8F);
  625. this.txtJ2.Location = new System.Drawing.Point(440, 144);
  626. this.txtJ2.Name = "txtJ2";
  627. this.txtJ2.Size = new System.Drawing.Size(88, 20);
  628. this.txtJ2.TabIndex = 10;
  629. this.txtJ2.Text = "";
  630. this.txtJ2.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
  631. this.txtJ2.TextChanged += new System.EventHandler(this.txtJX_TextChanged);
  632. // 
  633. // txtP2
  634. // 
  635. this.txtP2.Font = new System.Drawing.Font("宋体", 8F);
  636. this.txtP2.Location = new System.Drawing.Point(6, 144);
  637. this.txtP2.Name = "txtP2";
  638. this.txtP2.Size = new System.Drawing.Size(430, 20);
  639. this.txtP2.TabIndex = 9;
  640. this.txtP2.Text = "";
  641. // 
  642. // txtJ1
  643. // 
  644. this.txtJ1.Font = new System.Drawing.Font("宋体", 8F);
  645. this.txtJ1.Location = new System.Drawing.Point(440, 124);
  646. this.txtJ1.Name = "txtJ1";
  647. this.txtJ1.Size = new System.Drawing.Size(88, 20);
  648. this.txtJ1.TabIndex = 8;
  649. this.txtJ1.Text = "";
  650. this.txtJ1.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
  651. this.txtJ1.TextChanged += new System.EventHandler(this.txtJX_TextChanged);
  652. // 
  653. // txtP1
  654. // 
  655. this.txtP1.Font = new System.Drawing.Font("宋体", 8F);
  656. this.txtP1.Location = new System.Drawing.Point(6, 124);
  657. this.txtP1.Name = "txtP1";
  658. this.txtP1.Size = new System.Drawing.Size(430, 20);
  659. this.txtP1.TabIndex = 7;
  660. this.txtP1.Text = "";
  661. // 
  662. // label34
  663. // 
  664. this.label34.Location = new System.Drawing.Point(538, 94);
  665. this.label34.Name = "label34";
  666. this.label34.Size = new System.Drawing.Size(230, 22);
  667. this.label34.TabIndex = 33;
  668. this.label34.Text = "备           注";
  669. this.label34.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
  670. // 
  671. // label33
  672. // 
  673. this.label33.Location = new System.Drawing.Point(8, 94);
  674. this.label33.Name = "label33";
  675. this.label33.Size = new System.Drawing.Size(520, 22);
  676. this.label33.TabIndex = 32;
  677. this.label33.Text = "品       目       及       金       额";
  678. this.label33.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
  679. // 
  680. // txtCollecterID
  681. // 
  682. this.txtCollecterID.Location = new System.Drawing.Point(494, 58);
  683. this.txtCollecterID.Name = "txtCollecterID";
  684. this.txtCollecterID.Size = new System.Drawing.Size(282, 21);
  685. this.txtCollecterID.TabIndex = 6;
  686. this.txtCollecterID.Text = "";
  687. // 
  688. // txtInvoiceApplicationNo
  689. // 
  690. this.txtInvoiceApplicationNo.Location = new System.Drawing.Point(494, 18);
  691. this.txtInvoiceApplicationNo.Name = "txtInvoiceApplicationNo";
  692. this.txtInvoiceApplicationNo.Size = new System.Drawing.Size(282, 21);
  693. this.txtInvoiceApplicationNo.TabIndex = 3;
  694. this.txtInvoiceApplicationNo.Text = "";
  695. // 
  696. // label31
  697. // 
  698. this.label31.Location = new System.Drawing.Point(398, 70);
  699. this.label31.Name = "label31";
  700. this.label31.Size = new System.Drawing.Size(92, 18);
  701. this.label31.TabIndex = 29;
  702. this.label31.Text = "或 证 件 号 码";
  703. this.label31.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
  704. // 
  705. // label32
  706. // 
  707. this.label32.Location = new System.Drawing.Point(398, 50);
  708. this.label32.Name = "label32";
  709. this.label32.Size = new System.Drawing.Size(92, 18);
  710. this.label32.TabIndex = 28;
  711. this.label32.Text = "收款方识别号";
  712. this.label32.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
  713. // 
  714. // label29
  715. // 
  716. this.label29.Location = new System.Drawing.Point(398, 26);
  717. this.label29.Name = "label29";
  718. this.label29.Size = new System.Drawing.Size(92, 18);
  719. this.label29.TabIndex = 27;
  720. this.label29.Text = "申 请 表 号 码";
  721. this.label29.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
  722. // 
  723. // label30
  724. // 
  725. this.label30.Location = new System.Drawing.Point(398, 6);
  726. this.label30.Name = "label30";
  727. this.label30.Size = new System.Drawing.Size(92, 18);
  728. this.label30.TabIndex = 26;
  729. this.label30.Text = "代开普通发票";
  730. this.label30.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
  731. // 
  732. // txtCollecterAddTel
  733. // 
  734. this.txtCollecterAddTel.Location = new System.Drawing.Point(104, 68);
  735. this.txtCollecterAddTel.Name = "txtCollecterAddTel";
  736. this.txtCollecterAddTel.Size = new System.Drawing.Size(282, 21);
  737. this.txtCollecterAddTel.TabIndex = 5;
  738. this.txtCollecterAddTel.Text = "";
  739. // 
  740. // txtCollecter
  741. // 
  742. this.txtCollecter.Location = new System.Drawing.Point(104, 48);
  743. this.txtCollecter.Name = "txtCollecter";
  744. this.txtCollecter.Size = new System.Drawing.Size(282, 21);
  745. this.txtCollecter.TabIndex = 4;
  746. this.txtCollecter.Text = "";
  747. // 
  748. // txtPayer
  749. // 
  750. this.txtPayer.Location = new System.Drawing.Point(104, 12);
  751. this.txtPayer.Name = "txtPayer";
  752. this.txtPayer.Size = new System.Drawing.Size(282, 21);
  753. this.txtPayer.TabIndex = 2;
  754. this.txtPayer.Text = "";
  755. // 
  756. // pictureBox1
  757. // 
  758. this.pictureBox1.Location = new System.Drawing.Point(390, 8);
  759. this.pictureBox1.Name = "pictureBox1";
  760. this.pictureBox1.Size = new System.Drawing.Size(3, 80);
  761. this.pictureBox1.TabIndex = 22;
  762. this.pictureBox1.TabStop = false;
  763. // 
  764. // label17
  765. // 
  766. this.label17.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
  767. | System.Windows.Forms.AnchorStyles.Right)));
  768. this.label17.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
  769. this.label17.Location = new System.Drawing.Point(6, 116);
  770. this.label17.Name = "label17";
  771. this.label17.Size = new System.Drawing.Size(768, 3);
  772. this.label17.TabIndex = 10;
  773. // 
  774. // label13
  775. // 
  776. this.label13.Location = new System.Drawing.Point(8, 70);
  777. this.label13.Name = "label13";
  778. this.label13.Size = new System.Drawing.Size(92, 18);
  779. this.label13.TabIndex = 6;
  780. this.label13.Text = "及地址、电话";
  781. this.label13.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
  782. // 
  783. // label12
  784. // 
  785. this.label12.Location = new System.Drawing.Point(8, 50);
  786. this.label12.Name = "label12";
  787. this.label12.Size = new System.Drawing.Size(92, 18);
  788. this.label12.TabIndex = 5;
  789. this.label12.Text = "收款方名称";
  790. this.label12.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
  791. // 
  792. // label11
  793. // 
  794. this.label11.Location = new System.Drawing.Point(8, 6);
  795. this.label11.Name = "label11";
  796. this.label11.Size = new System.Drawing.Size(92, 36);
  797. this.label11.TabIndex = 4;
  798. this.label11.Text = "付款方名称";
  799. this.label11.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
  800. // 
  801. // label10
  802. // 
  803. this.label10.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
  804. | System.Windows.Forms.AnchorStyles.Right)));
  805. this.label10.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
  806. this.label10.Location = new System.Drawing.Point(6, 88);
  807. this.label10.Name = "label10";
  808. this.label10.Size = new System.Drawing.Size(768, 3);
  809. this.label10.TabIndex = 2;
  810. this.label10.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
  811. // 
  812. // label9
  813. // 
  814. this.label9.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
  815. | System.Windows.Forms.AnchorStyles.Right)));
  816. this.label9.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
  817. this.label9.Location = new System.Drawing.Point(6, 44);
  818. this.label9.Name = "label9";
  819. this.label9.Size = new System.Drawing.Size(768, 3);
  820. this.label9.TabIndex = 1;
  821. // 
  822. // label8
  823. // 
  824. this.label8.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
  825. | System.Windows.Forms.AnchorStyles.Right)));
  826. this.label8.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
  827. this.label8.Location = new System.Drawing.Point(4, -10);
  828. this.label8.Name = "label8";
  829. this.label8.Size = new System.Drawing.Size(768, 9);
  830. this.label8.TabIndex = 0;
  831. // 
  832. // txtYear
  833. // 
  834. this.txtYear.Location = new System.Drawing.Point(4, 66);
  835. this.txtYear.Name = "txtYear";
  836. this.txtYear.ReadOnly = true;
  837. this.txtYear.Size = new System.Drawing.Size(32, 21);
  838. this.txtYear.TabIndex = 0;
  839. this.txtYear.TabStop = false;
  840. this.txtYear.Text = "2005";
  841. // 
  842. // txtMonth
  843. // 
  844. this.txtMonth.Location = new System.Drawing.Point(52, 66);
  845. this.txtMonth.Name = "txtMonth";
  846. this.txtMonth.ReadOnly = true;
  847. this.txtMonth.Size = new System.Drawing.Size(20, 21);
  848. this.txtMonth.TabIndex = 0;
  849. this.txtMonth.TabStop = false;
  850. this.txtMonth.Text = "01";
  851. // 
  852. // txtDay
  853. // 
  854. this.txtDay.Location = new System.Drawing.Point(88, 66);
  855. this.txtDay.Name = "txtDay";
  856. this.txtDay.ReadOnly = true;
  857. this.txtDay.Size = new System.Drawing.Size(20, 21);
  858. this.txtDay.TabIndex = 0;
  859. this.txtDay.TabStop = false;
  860. this.txtDay.Text = "01";
  861. // 
  862. // label5
  863. // 
  864. this.label5.Location = new System.Drawing.Point(36, 68);
  865. this.label5.Name = "label5";
  866. this.label5.Size = new System.Drawing.Size(16, 20);
  867. this.label5.TabIndex = 10;
  868. this.label5.Text = "年";
  869. this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
  870. // 
  871. // label6
  872. // 
  873. this.label6.Location = new System.Drawing.Point(72, 68);
  874. this.label6.Name = "label6";
  875. this.label6.Size = new System.Drawing.Size(16, 20);
  876. this.label6.TabIndex = 11;
  877. this.label6.Text = "月";
  878. this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
  879. // 
  880. // label7
  881. // 
  882. this.label7.Location = new System.Drawing.Point(112, 68);
  883. this.label7.Name = "label7";
  884. this.label7.Size = new System.Drawing.Size(16, 20);
  885. this.label7.TabIndex = 12;
  886. this.label7.Text = "日";
  887. this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
  888. // 
  889. // label22
  890. // 
  891. this.label22.Location = new System.Drawing.Point(6, 486);
  892. this.label22.Name = "label22";
  893. this.label22.Size = new System.Drawing.Size(54, 22);
  894. this.label22.TabIndex = 13;
  895. this.label22.Text = "税控码:";
  896. this.label22.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
  897. // 
  898. // label23
  899. // 
  900. this.label23.Location = new System.Drawing.Point(402, 486);
  901. this.label23.Name = "label23";
  902. this.label23.Size = new System.Drawing.Size(54, 22);
  903. this.label23.TabIndex = 14;
  904. this.label23.Text = "开票人:";
  905. this.label23.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
  906. // 
  907. // txtTaxControlCode
  908. // 
  909. this.txtTaxControlCode.Location = new System.Drawing.Point(62, 486);
  910. this.txtTaxControlCode.Name = "txtTaxControlCode";
  911. this.txtTaxControlCode.Size = new System.Drawing.Size(324, 21);
  912. this.txtTaxControlCode.TabIndex = 32;
  913. this.txtTaxControlCode.Text = "";
  914. // 
  915. // txtWriter
  916. // 
  917. this.txtWriter.Location = new System.Drawing.Point(458, 486);
  918. this.txtWriter.Name = "txtWriter";
  919. this.txtWriter.Size = new System.Drawing.Size(324, 21);
  920. this.txtWriter.TabIndex = 33;
  921. this.txtWriter.Text = "";
  922. // 
  923. // btnPrint
  924. // 
  925. this.btnPrint.Location = new System.Drawing.Point(480, 512);
  926. this.btnPrint.Name = "btnPrint";
  927. this.btnPrint.TabIndex = 35;
  928. this.btnPrint.Tag = "打印";
  929. this.btnPrint.Text = "打印(&P)";
  930. this.btnPrint.Click += new System.EventHandler(this.Print_Click);
  931. // 
  932. // btnPreview
  933. // 
  934. this.btnPreview.Location = new System.Drawing.Point(562, 512);
  935. this.btnPreview.Name = "btnPreview";
  936. this.btnPreview.TabIndex = 36;
  937. this.btnPreview.Tag = "预览";
  938. this.btnPreview.Text = "预览(&V)";
  939. this.btnPreview.Click += new System.EventHandler(this.Print_Click);
  940. // 
  941. // btnExit
  942. // 
  943. this.btnExit.DialogResult = System.Windows.Forms.DialogResult.Cancel;
  944. this.btnExit.Location = new System.Drawing.Point(708, 512);
  945. this.btnExit.Name = "btnExit";
  946. this.btnExit.TabIndex = 37;
  947. this.btnExit.Text = "退出(&X)";
  948. this.btnExit.Click += new System.EventHandler(this.btnExit_Click);
  949. // 
  950. // btnCasePrint
  951. // 
  952. this.btnCasePrint.Location = new System.Drawing.Point(400, 512);
  953. this.btnCasePrint.Name = "btnCasePrint";
  954. this.btnCasePrint.TabIndex = 34;
  955. this.btnCasePrint.Tag = "套打";
  956. this.btnCasePrint.Text = "套打(&T)";
  957. this.btnCasePrint.Click += new System.EventHandler(this.Print_Click);
  958. // 
  959. // btnRefDate
  960. // 
  961. this.btnRefDate.Location = new System.Drawing.Point(134, 66);
  962. this.btnRefDate.Name = "btnRefDate";
  963. this.btnRefDate.Size = new System.Drawing.Size(32, 23);
  964. this.btnRefDate.TabIndex = 0;
  965. this.btnRefDate.TabStop = false;
  966. this.btnRefDate.Text = "...";
  967. this.btnRefDate.Click += new System.EventHandler(this.btnRefDate_Click);
  968. // 
  969. // cldSelect
  970. // 
  971. this.cldSelect.Location = new System.Drawing.Point(169, 67);
  972. this.cldSelect.MaxDate = new System.DateTime(2999, 12, 31, 0, 0, 0, 0);
  973. this.cldSelect.MaxSelectionCount = 1;
  974. this.cldSelect.MinDate = new System.DateTime(1949, 1, 1, 0, 0, 0, 0);
  975. this.cldSelect.Name = "cldSelect";
  976. this.cldSelect.TabIndex = 39;
  977. this.cldSelect.TabStop = false;
  978. this.cldSelect.Visible = false;
  979. this.cldSelect.DateSelected += new System.Windows.Forms.DateRangeEventHandler(this.cldSelect_DateSelected);
  980. // 
  981. // frmInvoice
  982. // 
  983. this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
  984. this.CancelButton = this.btnExit;
  985. this.ClientSize = new System.Drawing.Size(792, 542);
  986. this.Controls.Add(this.cldSelect);
  987. this.Controls.Add(this.panel1);
  988. this.Controls.Add(this.btnRefDate);
  989. this.Controls.Add(this.btnCasePrint);
  990. this.Controls.Add(this.btnExit);
  991. this.Controls.Add(this.btnPreview);
  992. this.Controls.Add(this.btnPrint);
  993. this.Controls.Add(this.txtWriter);
  994. this.Controls.Add(this.txtTaxControlCode);
  995. this.Controls.Add(this.label23);
  996. this.Controls.Add(this.label22);
  997. this.Controls.Add(this.label7);
  998. this.Controls.Add(this.label6);
  999. this.Controls.Add(this.label5);
  1000. this.Controls.Add(this.txtDay);
  1001. this.Controls.Add(this.txtMonth);
  1002. this.Controls.Add(this.txtYear);
  1003. this.Controls.Add(this.txtInvoiceSerialNo);
  1004. this.Controls.Add(this.txtInvoiceCode);
  1005. this.Controls.Add(this.label4);
  1006. this.Controls.Add(this.label3);
  1007. this.Controls.Add(this.label2);
  1008. this.Controls.Add(this.label1);
  1009. this.KeyPreview = true;
  1010. this.MaximizeBox = false;
  1011. this.MinimizeBox = false;
  1012. this.Name = "frmInvoice";
  1013. this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
  1014. this.Text = "黑龙江省大庆市国家税务局[代 开 统 一 发 票(国 税)]";
  1015. this.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.frmInvoice_KeyPress);
  1016. this.Load += new System.EventHandler(this.frmInvoice_Load);
  1017. this.panel1.ResumeLayout(false);
  1018. this.ResumeLayout(false);
  1019. }
  1020. #endregion
  1021. //打印情况,套打、打印、预览
  1022. enum PrintFlag
  1023. {
  1024. /// <summary>
  1025. /// 套打,只打印没有印刷的部分
  1026. /// </summary>
  1027. CasePrint,
  1028. /// <summary>
  1029. /// 打印全部
  1030. /// </summary>
  1031. PrintAll,
  1032. /// <summary>
  1033. /// 预览全部
  1034. /// </summary>
  1035. PreviewAll
  1036. }
  1037. private void frmInvoice_Load(object sender, System.EventArgs e)
  1038. {
  1039. //初始当日日期
  1040. System.DateTime dt = System.DateTime.Now;
  1041. SetToday(dt);
  1042. }
  1043. private void btnExit_Click(object sender, System.EventArgs e)
  1044. {
  1045. this.Close();
  1046. }
  1047. private void Print_Click(object sender, System.EventArgs e)
  1048. {
  1049. Button btn = (Button)sender;
  1050. switch(btn.Tag.ToString())
  1051. {
  1052. case "套打":
  1053. Print(PrintFlag.CasePrint);
  1054. break;
  1055. case "打印":
  1056. Print(PrintFlag.PrintAll);
  1057. break;
  1058. case "预览":
  1059. Print(PrintFlag.PreviewAll);
  1060. break;
  1061. }
  1062. }
  1063. private void Print(PrintFlag p_printFlag)
  1064. {
  1065. //制作步骤:
  1066. /* 1、用Excel作出与要打印的样式一样的电子表格存为模板;
  1067.  *     技巧:最好把第一行与第一列作为空行,以利于调整边距(虽然Excel、打印机可调整页边距), 尽量的在需要调整的地方多空几行与几列,以利于调整套打对准
  1068.  * 
  1069.  *  2、如同本程序一样,将Excel作为套打的模板,直接将要打印的数据写入;
  1070.  * 
  1071.  *  3、打印,根据实际的效果调整Excel模板行高列宽及空出的行列, 直到能够准确的套上。将模板拷贝一份,清除模板上的文字也网格线,做成套打的模板。
  1072.  */
  1073. #region 套打、打印预览
  1074. //用Excel打印,步骤为:打开、写数据、打印预览、关闭
  1075. GoldPrinter.ExcelAccess excel = new GoldPrinter.ExcelAccess();
  1076. string strFileName = "invoice.xlt"; //模板文件名
  1077. if (p_printFlag == PrintFlag.CasePrint)
  1078. {
  1079. strFileName = "invoiceCase.xlt"; //套打模板文件名
  1080. }
  1081. string strExcelTemplateFile = System.IO.Path.GetFullPath(@"....ExcelTemplate" + strFileName);
  1082. excel.Open(strExcelTemplateFile); //用模板文件
  1083. excel.IsVisibledExcel = true;
  1084. excel.FormCaption = "税 务 机 关 代 开 统 一 发 票(国 税)"; //"MIS金质打印通  通打天下报表";
  1085. //在模板中写入要打印的数据
  1086. //***发票抬头***
  1087. //年月日
  1088. excel.SetCellText(7,"B",txtYear.Text + "年" + txtMonth.Text + "月" + txtDay.Text + "日" );
  1089. //付款方名称
  1090. excel.SetCellText(8,"D",txtPayer.Text);
  1091. //收款方名称
  1092. excel.SetCellText(9,"D",txtCollecter.Text);
  1093. //及地址、电话
  1094. excel.SetCellText(11,"D",txtCollecterAddTel.Text);
  1095. // 代开普通发票    申 请 表 号 码
  1096. excel.SetCellText(8,"J",txtInvoiceApplicationNo.Text);
  1097. //收款方识别号或 证 件 号 码
  1098. excel.SetCellText(9,"J",txtCollecterID.Text);
  1099. //***品名及金额、备注***
  1100. //B14到B23是品名   F14到F23为金额
  1101. excel.SetCellText(14,"B",txtP1.Text);
  1102. excel.SetCellText(14,"F",txtJ1.Text);
  1103. excel.SetCellText(15,"B",txtP2.Text);
  1104. excel.SetCellText(15,"F",txtJ2.Text);
  1105. excel.SetCellText(16,"B",txtP3.Text);
  1106. excel.SetCellText(16,"F",txtJ3.Text);
  1107. excel.SetCellText(17,"B",txtP4.Text);
  1108. excel.SetCellText(17,"F",txtJ4.Text);
  1109. excel.SetCellText(18,"B",txtP5.Text);
  1110. excel.SetCellText(18,"F",txtJ5.Text);
  1111. excel.SetCellText(19,"B",txtP6.Text);
  1112. excel.SetCellText(19,"F",txtJ6.Text);
  1113. excel.SetCellText(20,"B",txtP7.Text);
  1114. excel.SetCellText(20,"F",txtJ7.Text);
  1115. excel.SetCellText(21,"B",txtP8.Text);
  1116. excel.SetCellText(21,"F",txtJ8.Text);
  1117. excel.SetCellText(22,"B",txtP9.Text);
  1118. excel.SetCellText(22,"F",txtJ9.Text);
  1119. excel.SetCellText(23,"B",txtP10.Text);
  1120. excel.SetCellText(23,"F",txtJ10.Text);
  1121. //备注
  1122. excel.SetCellText(14,"I",txtMemo.Text);
  1123. //***发票总金额***
  1124. //合计人民币   (大写)
  1125. excel.SetCellText(24,"D",txtTotalUpper.Text);
  1126. //合计人民币   (小写)
  1127. excel.SetCellText(24,"K",txtTotalLower.Text);
  1128. //税额   (大写)
  1129. excel.SetCellText(25,"D",txtTaxUpper.Text);
  1130. //税额   (小写)
  1131. excel.SetCellText(25,"L",txtTaxLower.Text);
  1132. //***发票尾***
  1133. //税控码
  1134. excel.SetCellText(26,"C",txtTaxControlCode.Text);
  1135. //开票人:
  1136. excel.SetCellText(26,"H",txtWriter.Text);
  1137. if (p_printFlag == PrintFlag.CasePrint || p_printFlag == PrintFlag.PrintAll)
  1138. {
  1139. excel.Print(); //打印
  1140. }
  1141. else
  1142. {
  1143. excel.PrintPreview(); //预览
  1144. }
  1145. excel.Close(); //关闭并释放
  1146. #endregion
  1147. }
  1148. //回车
  1149. private void frmInvoice_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e)
  1150. {
  1151. if (e.KeyChar == (char)13)
  1152. {
  1153. SendKeys.Send("{TAB}");
  1154. }
  1155. }
  1156. //金额小写转人民币大写
  1157. private void txtTotalLower_KeyUp(object sender, System.Windows.Forms.KeyEventArgs e)
  1158. {
  1159. SetUpperMoney();
  1160. }
  1161. //重新总计
  1162. private void txtJX_TextChanged(object sender, System.EventArgs e)
  1163. {
  1164. double dblMoney = 0;
  1165. dblMoney += GetInputMoney(txtJ1.Text);
  1166. dblMoney += GetInputMoney(txtJ2.Text);
  1167. dblMoney += GetInputMoney(txtJ3.Text);
  1168. dblMoney += GetInputMoney(txtJ4.Text);
  1169. dblMoney += GetInputMoney(txtJ5.Text);
  1170. dblMoney += GetInputMoney(txtJ6.Text);
  1171. dblMoney += GetInputMoney(txtJ7.Text);
  1172. dblMoney += GetInputMoney(txtJ8.Text);
  1173. dblMoney += GetInputMoney(txtJ9.Text);
  1174. dblMoney += GetInputMoney(txtJ10.Text);
  1175. txtTotalLower.Text = dblMoney.ToString();
  1176. SetUpperMoney();
  1177. }
  1178. //改变税率重算
  1179. private void cboTaxRate_TextChanged(object sender, System.EventArgs e)
  1180. {
  1181. SetUpperMoney();
  1182. }
  1183. private void btnRefDate_Click(object sender, System.EventArgs e)
  1184. {
  1185. cldSelect.Visible = true;
  1186. cldSelect.SetDate(new DateTime(int.Parse(txtYear.Text),int.Parse(txtMonth.Text),int.Parse(txtDay.Text)));
  1187. cldSelect.Focus();
  1188. }
  1189. private void cldSelect_DateSelected(object sender, System.Windows.Forms.DateRangeEventArgs e)
  1190. {
  1191. SetToday(e.End);
  1192. cldSelect.Visible = false;
  1193. }
  1194. //大写合计人民币、税额
  1195. private void SetUpperMoney()
  1196. {
  1197. try
  1198. {
  1199. string strUpper = GoldPrinter.ChineseNum.GetUpperMoney(Double.Parse(txtTotalLower.Text));
  1200. //合计人民币
  1201. txtTotalUpper.Text = strUpper;
  1202. strUpper = GoldPrinter.ChineseNum.GetUpperMoney(Double.Parse(txtTotalLower.Text) * Double.Parse(cboTaxRate.Text) / 100);
  1203. //税额 = 合计人民币 * 税率
  1204. txtTaxUpper.Text = strUpper;
  1205. }
  1206. catch{}
  1207. }
  1208. private double GetInputMoney(string p_text)
  1209. {
  1210. double dblReturn = 0;
  1211. try
  1212. {
  1213. dblReturn = double.Parse(p_text);
  1214. }
  1215. catch{}
  1216. return dblReturn;
  1217. }
  1218. private void SetToday(System.DateTime dt)
  1219. {
  1220. txtYear.Text = dt.Year.ToString();
  1221. txtMonth.Text = GetLengthTwoDate(dt.Month.ToString());
  1222. txtDay.Text = GetLengthTwoDate(dt.Day.ToString());
  1223. }
  1224. private string GetLengthTwoDate(string p_MonthOrDay)
  1225. {
  1226. string strReturn = p_MonthOrDay;
  1227. if (strReturn.Length == 1)
  1228. {
  1229. strReturn = "0" + strReturn;
  1230. }
  1231. return strReturn;
  1232. }
  1233. }//End Class
  1234. }//End Namespace