?? zkadd.cs
字號:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Data.SqlClient;
namespace MKIms3
{
/// <summary>
/// ZKAdd 的摘要說明。
/// </summary>
public class ZKAdd : System.Windows.Forms.Form
{
public delegate void SendMess ( double x,double y ,double z ,string k_id) ;
//定義委托類型
public event SendMess Send ;
private string k_no;
private double k_x;
private double k_y;
private double k_z;
private double k_h;
private string k_com;
private DateTime k_date;
private string k_other;
private int k_id;
private string k_lay;
private bool bk_no;
private bool bk_x;
private bool bk_y;
private bool bk_z;
private bool bk_h;
private bool bk_com;
private bool bk_lay;
private DataSet null_Set;
private DataGridTableStyle GridTableStyle;
private bool point; //用來標示是直接輸入還是圖上添加,圖上為true
#region 系統自己生成的字段
private System.Windows.Forms.GroupBox groupBox4;
private System.Windows.Forms.Button button_add_ceng;
private System.Windows.Forms.TextBox textBox2;
private System.Windows.Forms.Button button_add_kong;
private System.Windows.Forms.GroupBox groupBox3;
private System.Windows.Forms.DateTimePicker dateTimePicker_data;
private System.Windows.Forms.TextBox txt_other;
private System.Windows.Forms.Label label10;
private System.Windows.Forms.Label label11;
private System.Windows.Forms.Label label12;
private System.Windows.Forms.Label label13;
private System.Windows.Forms.Label label14;
private System.Windows.Forms.Label label15;
private System.Windows.Forms.Label label16;
private System.Windows.Forms.TextBox txt_no;
private System.Windows.Forms.TextBox txt_lay;
private System.Windows.Forms.Label label17;
private System.Windows.Forms.Label label18;
private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.DataGrid dataGrid_lay;
private System.Windows.Forms.NumericUpDown numericUpDown_x;
private System.Windows.Forms.NumericUpDown numericUpDown_y;
private System.Windows.Forms.NumericUpDown numericUpDown_z;
private System.Windows.Forms.NumericUpDown numericUpDown_h;
private System.Windows.Forms.TextBox txt_com;
private System.Windows.Forms.ErrorProvider erp;
#endregion
/// <summary>
/// 必需的設計器變量。
/// </summary>
private System.ComponentModel.Container components = null;
public ZKAdd(double x,double y,bool point)
{
//
// Windows 窗體設計器支持所必需的
//
InitializeComponent();
//
// TODO: 在 InitializeComponent 調用后添加任何構造函數代碼
//
bk_no = false;
bk_x= false;
bk_y= false;
bk_z= false;
bk_h= false;
bk_com= false;
bk_lay= false;
this.numericUpDown_x.Value = Convert.ToDecimal(x);
this.numericUpDown_y.Value = Convert.ToDecimal(y);
this.point = point;
}
/// <summary>
/// 清理所有正在使用的資源。
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows 窗體設計器生成的代碼
/// <summary>
/// 設計器支持所需的方法 - 不要使用代碼編輯器修改
/// 此方法的內容。
/// </summary>
private void InitializeComponent()
{
System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(ZKAdd));
this.groupBox4 = new System.Windows.Forms.GroupBox();
this.button_add_ceng = new System.Windows.Forms.Button();
this.textBox2 = new System.Windows.Forms.TextBox();
this.button_add_kong = new System.Windows.Forms.Button();
this.groupBox3 = new System.Windows.Forms.GroupBox();
this.numericUpDown_h = new System.Windows.Forms.NumericUpDown();
this.numericUpDown_z = new System.Windows.Forms.NumericUpDown();
this.numericUpDown_y = new System.Windows.Forms.NumericUpDown();
this.numericUpDown_x = new System.Windows.Forms.NumericUpDown();
this.dateTimePicker_data = new System.Windows.Forms.DateTimePicker();
this.txt_other = new System.Windows.Forms.TextBox();
this.txt_com = new System.Windows.Forms.TextBox();
this.label10 = new System.Windows.Forms.Label();
this.label11 = new System.Windows.Forms.Label();
this.label12 = new System.Windows.Forms.Label();
this.label13 = new System.Windows.Forms.Label();
this.label14 = new System.Windows.Forms.Label();
this.label15 = new System.Windows.Forms.Label();
this.label16 = new System.Windows.Forms.Label();
this.txt_no = new System.Windows.Forms.TextBox();
this.txt_lay = new System.Windows.Forms.TextBox();
this.label17 = new System.Windows.Forms.Label();
this.label18 = new System.Windows.Forms.Label();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.dataGrid_lay = new System.Windows.Forms.DataGrid();
this.erp = new System.Windows.Forms.ErrorProvider();
this.groupBox4.SuspendLayout();
this.groupBox3.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown_h)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown_z)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown_y)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown_x)).BeginInit();
this.groupBox2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dataGrid_lay)).BeginInit();
this.SuspendLayout();
//
// groupBox4
//
this.groupBox4.Controls.Add(this.button_add_ceng);
this.groupBox4.Controls.Add(this.textBox2);
this.groupBox4.Controls.Add(this.button_add_kong);
this.groupBox4.Location = new System.Drawing.Point(424, 8);
this.groupBox4.Name = "groupBox4";
this.groupBox4.Size = new System.Drawing.Size(272, 184);
this.groupBox4.TabIndex = 10;
this.groupBox4.TabStop = false;
this.groupBox4.Text = "操作說明";
//
// button_add_ceng
//
this.button_add_ceng.Enabled = false;
this.button_add_ceng.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.button_add_ceng.Location = new System.Drawing.Point(139, 144);
this.button_add_ceng.Name = "button_add_ceng";
this.button_add_ceng.Size = new System.Drawing.Size(119, 24);
this.button_add_ceng.TabIndex = 1;
this.button_add_ceng.Text = "提交鉆孔煤層信息";
this.button_add_ceng.Click += new System.EventHandler(this.button_add_ceng_Click);
//
// textBox2
//
this.textBox2.AcceptsReturn = true;
this.textBox2.BackColor = System.Drawing.SystemColors.Info;
this.textBox2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.textBox2.Cursor = System.Windows.Forms.Cursors.No;
this.textBox2.Enabled = false;
this.textBox2.ForeColor = System.Drawing.Color.DarkRed;
this.textBox2.Location = new System.Drawing.Point(8, 16);
this.textBox2.Multiline = true;
this.textBox2.Name = "textBox2";
this.textBox2.Size = new System.Drawing.Size(256, 120);
this.textBox2.TabIndex = 2;
this.textBox2.Text = " 1.帶(*)的項為必填項 。 2.首先填寫鉆孔" +
"基本信息,確認無誤后提交。 3.依次填寫鉆孔煤層信息,確認無誤后提交。 4.您添加的鉆孔只能在系統默認地圖上顯示。 5.巖性說明:您可以從下拉列表框中選擇" +
",如果所需巖性不存在,請先在巖性管理操作中添加。6.層位說明:例如 P2(2-1)中前一個2為下標“2-1”為上標,其他依此類推。 ";
//
// button_add_kong
//
this.button_add_kong.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.button_add_kong.Location = new System.Drawing.Point(11, 144);
this.button_add_kong.Name = "button_add_kong";
this.button_add_kong.Size = new System.Drawing.Size(120, 24);
this.button_add_kong.TabIndex = 0;
this.button_add_kong.Text = "提交鉆孔基本信息";
this.button_add_kong.Click += new System.EventHandler(this.button_add_kong_Click);
//
// groupBox3
//
this.groupBox3.Controls.Add(this.numericUpDown_h);
this.groupBox3.Controls.Add(this.numericUpDown_z);
this.groupBox3.Controls.Add(this.numericUpDown_y);
this.groupBox3.Controls.Add(this.numericUpDown_x);
this.groupBox3.Controls.Add(this.dateTimePicker_data);
this.groupBox3.Controls.Add(this.txt_other);
this.groupBox3.Controls.Add(this.txt_com);
this.groupBox3.Controls.Add(this.label10);
this.groupBox3.Controls.Add(this.label11);
this.groupBox3.Controls.Add(this.label12);
this.groupBox3.Controls.Add(this.label13);
this.groupBox3.Controls.Add(this.label14);
this.groupBox3.Controls.Add(this.label15);
this.groupBox3.Controls.Add(this.label16);
this.groupBox3.Controls.Add(this.txt_no);
this.groupBox3.Controls.Add(this.txt_lay);
this.groupBox3.Controls.Add(this.label17);
this.groupBox3.Controls.Add(this.label18);
this.groupBox3.Location = new System.Drawing.Point(8, 8);
this.groupBox3.Name = "groupBox3";
this.groupBox3.Size = new System.Drawing.Size(408, 184);
this.groupBox3.TabIndex = 8;
this.groupBox3.TabStop = false;
this.groupBox3.Text = "鉆孔基本信息";
//
// numericUpDown_h
//
this.numericUpDown_h.DecimalPlaces = 2;
this.numericUpDown_h.Location = new System.Drawing.Point(286, 24);
this.numericUpDown_h.Maximum = new System.Decimal(new int[] {
999999999,
0,
0,
0});
this.numericUpDown_h.Name = "numericUpDown_h";
this.numericUpDown_h.Size = new System.Drawing.Size(98, 21);
this.numericUpDown_h.TabIndex = 4;
this.numericUpDown_h.ThousandsSeparator = true;
this.numericUpDown_h.Validated += new System.EventHandler(this.numericUpDown_h_Validated);
//
// numericUpDown_z
//
this.numericUpDown_z.DecimalPlaces = 2;
this.numericUpDown_z.Location = new System.Drawing.Point(88, 97);
this.numericUpDown_z.Maximum = new System.Decimal(new int[] {
999999999,
0,
0,
0});
this.numericUpDown_z.Name = "numericUpDown_z";
this.numericUpDown_z.Size = new System.Drawing.Size(96, 21);
this.numericUpDown_z.TabIndex = 3;
this.numericUpDown_z.ThousandsSeparator = true;
this.numericUpDown_z.Validated += new System.EventHandler(this.numericUpDown_z_Validated);
//
// numericUpDown_y
//
this.numericUpDown_y.DecimalPlaces = 2;
this.numericUpDown_y.Location = new System.Drawing.Point(88, 73);
this.numericUpDown_y.Maximum = new System.Decimal(new int[] {
999999999,
0,
0,
0});
this.numericUpDown_y.Name = "numericUpDown_y";
this.numericUpDown_y.Size = new System.Drawing.Size(96, 21);
this.numericUpDown_y.TabIndex = 2;
this.numericUpDown_y.ThousandsSeparator = true;
this.numericUpDown_y.Validated += new System.EventHandler(this.numericUpDown_y_Validated);
//
// numericUpDown_x
//
this.numericUpDown_x.DecimalPlaces = 2;
this.numericUpDown_x.Location = new System.Drawing.Point(88, 49);
this.numericUpDown_x.Maximum = new System.Decimal(new int[] {
999999999,
0,
0,
0});
this.numericUpDown_x.Name = "numericUpDown_x";
this.numericUpDown_x.Size = new System.Drawing.Size(96, 21);
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -