FrmSelDel.cs 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239
  1. using System;
  2. using System.Drawing;
  3. using System.Collections;
  4. using System.ComponentModel;
  5. using System.Windows.Forms;
  6. namespace Core.StlMes.Client.LgResMgt
  7. {
  8. /// <summary>
  9. /// FrmSelDel 的摘要说明。
  10. /// </summary>
  11. public class FrmSelDel : System.Windows.Forms.Form
  12. {
  13. private System.Windows.Forms.Button button1;
  14. private System.Windows.Forms.Button button2;
  15. private System.Windows.Forms.Button button3;
  16. private System.Windows.Forms.ToolTip toolTip1;
  17. private Button button4;
  18. private NumericUpDown numericUpDown1;
  19. private Label label2;
  20. private Label label3;
  21. private GroupBox groupBox1;
  22. private Label label1;
  23. private System.ComponentModel.IContainer components;
  24. public FrmSelDel()
  25. {
  26. //
  27. // Windows 窗体设计器支持所必需的
  28. //
  29. InitializeComponent();
  30. //
  31. // TODO: 在 InitializeComponent 调用后添加任何构造函数代码
  32. //
  33. }
  34. /// <summary>
  35. /// 清理所有正在使用的资源。
  36. /// </summary>
  37. protected override void Dispose( bool disposing )
  38. {
  39. if( disposing )
  40. {
  41. if(components != null)
  42. {
  43. components.Dispose();
  44. }
  45. }
  46. base.Dispose( disposing );
  47. }
  48. #region Windows 窗体设计器生成的代码
  49. /// <summary>
  50. /// 设计器支持所需的方法 - 不要使用代码编辑器修改
  51. /// 此方法的内容。
  52. /// </summary>
  53. private void InitializeComponent()
  54. {
  55. this.components = new System.ComponentModel.Container();
  56. this.button1 = new System.Windows.Forms.Button();
  57. this.button2 = new System.Windows.Forms.Button();
  58. this.button3 = new System.Windows.Forms.Button();
  59. this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
  60. this.button4 = new System.Windows.Forms.Button();
  61. this.numericUpDown1 = new System.Windows.Forms.NumericUpDown();
  62. this.label2 = new System.Windows.Forms.Label();
  63. this.label3 = new System.Windows.Forms.Label();
  64. this.groupBox1 = new System.Windows.Forms.GroupBox();
  65. this.label1 = new System.Windows.Forms.Label();
  66. ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit();
  67. this.groupBox1.SuspendLayout();
  68. this.SuspendLayout();
  69. //
  70. // button1
  71. //
  72. this.button1.Location = new System.Drawing.Point(19, 34);
  73. this.button1.Name = "button1";
  74. this.button1.Size = new System.Drawing.Size(104, 23);
  75. this.button1.TabIndex = 0;
  76. this.button1.Text = "删除所选行";
  77. this.toolTip1.SetToolTip(this.button1, "删除当前选择的行");
  78. this.button1.Click += new System.EventHandler(this.button1_Click);
  79. //
  80. // button2
  81. //
  82. this.button2.Location = new System.Drawing.Point(146, 34);
  83. this.button2.Name = "button2";
  84. this.button2.Size = new System.Drawing.Size(98, 23);
  85. this.button2.TabIndex = 1;
  86. this.button2.Text = "删除所选炉号";
  87. this.toolTip1.SetToolTip(this.button2, "删除该炉号的所有数据");
  88. this.button2.Click += new System.EventHandler(this.button2_Click);
  89. //
  90. // button3
  91. //
  92. this.button3.Location = new System.Drawing.Point(307, 9);
  93. this.button3.Name = "button3";
  94. this.button3.Size = new System.Drawing.Size(120, 40);
  95. this.button3.TabIndex = 2;
  96. this.button3.Text = "取消";
  97. this.toolTip1.SetToolTip(this.button3, "取消");
  98. this.button3.Click += new System.EventHandler(this.button3_Click);
  99. //
  100. // button4
  101. //
  102. this.button4.Location = new System.Drawing.Point(269, 33);
  103. this.button4.Name = "button4";
  104. this.button4.Size = new System.Drawing.Size(104, 24);
  105. this.button4.TabIndex = 3;
  106. this.button4.Text = "删除所选支数";
  107. this.toolTip1.SetToolTip(this.button4, "取消");
  108. this.button4.Click += new System.EventHandler(this.button4_Click);
  109. //
  110. // numericUpDown1
  111. //
  112. this.numericUpDown1.Location = new System.Drawing.Point(388, 35);
  113. this.numericUpDown1.Name = "numericUpDown1";
  114. this.numericUpDown1.Size = new System.Drawing.Size(56, 21);
  115. this.numericUpDown1.TabIndex = 4;
  116. //
  117. // label2
  118. //
  119. this.label2.Font = new System.Drawing.Font("宋体", 10F);
  120. this.label2.ForeColor = System.Drawing.Color.Red;
  121. this.label2.Location = new System.Drawing.Point(28, 151);
  122. this.label2.Name = "label2";
  123. this.label2.Size = new System.Drawing.Size(383, 34);
  124. this.label2.TabIndex = 5;
  125. this.label2.Text = "说明:删除所选支数,删除的是所选炉号的最新生成的支数";
  126. this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
  127. //
  128. // label3
  129. //
  130. this.label3.Font = new System.Drawing.Font("宋体", 11F);
  131. this.label3.Location = new System.Drawing.Point(43, 9);
  132. this.label3.Name = "label3";
  133. this.label3.Size = new System.Drawing.Size(82, 40);
  134. this.label3.TabIndex = 7;
  135. this.label3.Text = "所选炉号:";
  136. this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
  137. //
  138. // groupBox1
  139. //
  140. this.groupBox1.Controls.Add(this.button1);
  141. this.groupBox1.Controls.Add(this.button2);
  142. this.groupBox1.Controls.Add(this.button4);
  143. this.groupBox1.Controls.Add(this.numericUpDown1);
  144. this.groupBox1.Location = new System.Drawing.Point(12, 64);
  145. this.groupBox1.Name = "groupBox1";
  146. this.groupBox1.Size = new System.Drawing.Size(460, 74);
  147. this.groupBox1.TabIndex = 8;
  148. this.groupBox1.TabStop = false;
  149. this.groupBox1.Text = "选择删除方式:";
  150. //
  151. // label1
  152. //
  153. this.label1.Font = new System.Drawing.Font("宋体", 11F, System.Drawing.FontStyle.Bold);
  154. this.label1.ForeColor = System.Drawing.Color.Blue;
  155. this.label1.Location = new System.Drawing.Point(119, 8);
  156. this.label1.Name = "label1";
  157. this.label1.Size = new System.Drawing.Size(97, 40);
  158. this.label1.TabIndex = 9;
  159. this.label1.Text = "13300000";
  160. this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
  161. //
  162. // FrmSelDel
  163. //
  164. this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
  165. this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(205)))), ((int)(((byte)(228)))), ((int)(((byte)(225)))));
  166. this.ClientSize = new System.Drawing.Size(495, 194);
  167. this.Controls.Add(this.label1);
  168. this.Controls.Add(this.button3);
  169. this.Controls.Add(this.groupBox1);
  170. this.Controls.Add(this.label3);
  171. this.Controls.Add(this.label2);
  172. this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
  173. this.MaximizeBox = false;
  174. this.MinimizeBox = false;
  175. this.Name = "FrmSelDel";
  176. this.ShowInTaskbar = false;
  177. this.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
  178. this.Text = "删除";
  179. this.Load += new System.EventHandler(this.FrmSelDel_Load);
  180. ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).EndInit();
  181. this.groupBox1.ResumeLayout(false);
  182. this.ResumeLayout(false);
  183. }
  184. #endregion
  185. public string _Flag = "D";
  186. public string heatno = "";
  187. public int codeCount = 0;
  188. private void button1_Click(object sender, System.EventArgs e)
  189. {
  190. _Flag = "A";
  191. this.Close();
  192. }
  193. private void button2_Click(object sender, System.EventArgs e)
  194. {
  195. _Flag = "B";
  196. this.Close();
  197. }
  198. private void button4_Click(object sender, EventArgs e)
  199. {
  200. _Flag = "C";
  201. try
  202. {
  203. codeCount = Convert.ToInt16(numericUpDown1.Value);
  204. }
  205. catch
  206. {
  207. MessageBox.Show("支数必须是大于零的整数!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
  208. return;
  209. }
  210. if (codeCount <= 0)
  211. {
  212. MessageBox.Show("支数必须是大于零的整数!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
  213. return;
  214. }
  215. this.Close();
  216. }
  217. private void button3_Click(object sender, System.EventArgs e)
  218. {
  219. _Flag = "D";
  220. this.Close();
  221. }
  222. private void FrmSelDel_Load(object sender, EventArgs e)
  223. {
  224. label1.Text = heatno;
  225. }
  226. }
  227. }