Skip to content
This repository
Browse code

Merge remote-tracking branch 'hefangli/master' into Develop

Conflicts:
	Application/Program.cs
	Application/frmMain.cs
  • Loading branch information...
commit 4ab8e8f5e17b685b114d5854d13c325ea9a86ba0 2 parents ebae449 + 4c978f7
katway authored October 29, 2012
18  Application/WorkStation.csproj
@@ -99,6 +99,12 @@
99 99
     <Compile Include="frmEditAndDeleteCard.Designer.cs">
100 100
       <DependentUpon>frmEditAndDeleteCard.cs</DependentUpon>
101 101
     </Compile>
  102
+    <Compile Include="frmEditOrDeleteEmployee.cs">
  103
+      <SubType>Form</SubType>
  104
+    </Compile>
  105
+    <Compile Include="frmEditOrDeleteEmployee.Designer.cs">
  106
+      <DependentUpon>frmEditOrDeleteEmployee.cs</DependentUpon>
  107
+    </Compile>
102 108
     <Compile Include="frmEditOrDeleteItem.cs">
103 109
       <SubType>Form</SubType>
104 110
     </Compile>
@@ -123,6 +129,12 @@
123 129
     <Compile Include="frmEditOrDeleteTask.Designer.cs">
124 130
       <DependentUpon>frmEditOrDeleteTask.cs</DependentUpon>
125 131
     </Compile>
  132
+    <Compile Include="frmAddEmployee.cs">
  133
+      <SubType>Form</SubType>
  134
+    </Compile>
  135
+    <Compile Include="frmAddEmployee.Designer.cs">
  136
+      <DependentUpon>frmAddEmployee.cs</DependentUpon>
  137
+    </Compile>
126 138
     <Compile Include="frmIssueTask.cs">
127 139
       <SubType>Form</SubType>
128 140
     </Compile>
@@ -161,6 +173,9 @@
161 173
     <EmbeddedResource Include="frmEditAndDeleteCard.resx">
162 174
       <DependentUpon>frmEditAndDeleteCard.cs</DependentUpon>
163 175
     </EmbeddedResource>
  176
+    <EmbeddedResource Include="frmEditOrDeleteEmployee.resx">
  177
+      <DependentUpon>frmEditOrDeleteEmployee.cs</DependentUpon>
  178
+    </EmbeddedResource>
164 179
     <EmbeddedResource Include="frmEditOrDeleteItem.resx">
165 180
       <DependentUpon>frmEditOrDeleteItem.cs</DependentUpon>
166 181
     </EmbeddedResource>
@@ -173,6 +188,9 @@
173 188
     <EmbeddedResource Include="frmEditOrDeleteTask.resx">
174 189
       <DependentUpon>frmEditOrDeleteTask.cs</DependentUpon>
175 190
     </EmbeddedResource>
  191
+    <EmbeddedResource Include="frmAddEmployee.resx">
  192
+      <DependentUpon>frmAddEmployee.cs</DependentUpon>
  193
+    </EmbeddedResource>
176 194
     <EmbeddedResource Include="frmIssueTask.resx">
177 195
       <DependentUpon>frmIssueTask.cs</DependentUpon>
178 196
     </EmbeddedResource>
8  Application/frmAddCard.Designer.cs
@@ -117,7 +117,7 @@ private void InitializeComponent()
117 117
             // 
118 118
             // btnAdd
119 119
             // 
120  
-            this.btnAdd.Location = new System.Drawing.Point(467, 145);
  120
+            this.btnAdd.Location = new System.Drawing.Point(456, 153);
121 121
             this.btnAdd.Name = "btnAdd";
122 122
             this.btnAdd.Size = new System.Drawing.Size(75, 23);
123 123
             this.btnAdd.TabIndex = 9;
@@ -142,10 +142,10 @@ private void InitializeComponent()
142 142
             this.Column3,
143 143
             this.Column4,
144 144
             this.Column5});
145  
-            this.dataGridView1.Location = new System.Drawing.Point(66, 212);
  145
+            this.dataGridView1.Location = new System.Drawing.Point(33, 222);
146 146
             this.dataGridView1.Name = "dataGridView1";
147 147
             this.dataGridView1.RowTemplate.Height = 23;
148  
-            this.dataGridView1.Size = new System.Drawing.Size(543, 169);
  148
+            this.dataGridView1.Size = new System.Drawing.Size(625, 162);
149 149
             this.dataGridView1.TabIndex = 10;
150 150
             // 
151 151
             // Column1
@@ -185,7 +185,7 @@ private void InitializeComponent()
185 185
             // 
186 186
             // button1
187 187
             // 
188  
-            this.button1.Location = new System.Drawing.Point(571, 145);
  188
+            this.button1.Location = new System.Drawing.Point(583, 153);
189 189
             this.button1.Name = "button1";
190 190
             this.button1.Size = new System.Drawing.Size(75, 23);
191 191
             this.button1.TabIndex = 11;
225  Application/frmAddEmployee.Designer.cs
... ...
@@ -0,0 +1,225 @@
  1
+namespace WorkStation
  2
+{
  3
+    partial class frmAddEmployee
  4
+    {
  5
+        /// <summary>
  6
+        /// Required designer variable.
  7
+        /// </summary>
  8
+        private System.ComponentModel.IContainer components = null;
  9
+
  10
+        /// <summary>
  11
+        /// Clean up any resources being used.
  12
+        /// </summary>
  13
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
  14
+        protected override void Dispose(bool disposing)
  15
+        {
  16
+            if (disposing && (components != null))
  17
+            {
  18
+                components.Dispose();
  19
+            }
  20
+            base.Dispose(disposing);
  21
+        }
  22
+
  23
+        #region Windows Form Designer generated code
  24
+
  25
+        /// <summary>
  26
+        /// Required method for Designer support - do not modify
  27
+        /// the contents of this method with the code editor.
  28
+        /// </summary>
  29
+        private void InitializeComponent()
  30
+        {
  31
+            this.label1 = new System.Windows.Forms.Label();
  32
+            this.label2 = new System.Windows.Forms.Label();
  33
+            this.label3 = new System.Windows.Forms.Label();
  34
+            this.label4 = new System.Windows.Forms.Label();
  35
+            this.txtName = new System.Windows.Forms.TextBox();
  36
+            this.txtAlias = new System.Windows.Forms.TextBox();
  37
+            this.cboCard = new System.Windows.Forms.ComboBox();
  38
+            this.cboPost = new System.Windows.Forms.ComboBox();
  39
+            this.dataGridView1 = new System.Windows.Forms.DataGridView();
  40
+            this.btnSave = new System.Windows.Forms.Button();
  41
+            this.btnCancel = new System.Windows.Forms.Button();
  42
+            this.Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
  43
+            this.Column2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
  44
+            this.Column3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
  45
+            this.Column4 = new System.Windows.Forms.DataGridViewTextBoxColumn();
  46
+            this.Column5 = new System.Windows.Forms.DataGridViewTextBoxColumn();
  47
+            ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
  48
+            this.SuspendLayout();
  49
+            // 
  50
+            // label1
  51
+            // 
  52
+            this.label1.AutoSize = true;
  53
+            this.label1.Location = new System.Drawing.Point(124, 53);
  54
+            this.label1.Name = "label1";
  55
+            this.label1.Size = new System.Drawing.Size(29, 12);
  56
+            this.label1.TabIndex = 0;
  57
+            this.label1.Text = "名称";
  58
+            // 
  59
+            // label2
  60
+            // 
  61
+            this.label2.AutoSize = true;
  62
+            this.label2.Location = new System.Drawing.Point(124, 93);
  63
+            this.label2.Name = "label2";
  64
+            this.label2.Size = new System.Drawing.Size(29, 12);
  65
+            this.label2.TabIndex = 1;
  66
+            this.label2.Text = "别名";
  67
+            // 
  68
+            // label3
  69
+            // 
  70
+            this.label3.AutoSize = true;
  71
+            this.label3.Location = new System.Drawing.Point(100, 131);
  72
+            this.label3.Name = "label3";
  73
+            this.label3.Size = new System.Drawing.Size(53, 12);
  74
+            this.label3.TabIndex = 2;
  75
+            this.label3.Text = "所属卡片";
  76
+            // 
  77
+            // label4
  78
+            // 
  79
+            this.label4.AutoSize = true;
  80
+            this.label4.Location = new System.Drawing.Point(100, 173);
  81
+            this.label4.Name = "label4";
  82
+            this.label4.Size = new System.Drawing.Size(53, 12);
  83
+            this.label4.TabIndex = 3;
  84
+            this.label4.Text = "所属岗位";
  85
+            // 
  86
+            // txtName
  87
+            // 
  88
+            this.txtName.Location = new System.Drawing.Point(187, 50);
  89
+            this.txtName.Name = "txtName";
  90
+            this.txtName.Size = new System.Drawing.Size(210, 21);
  91
+            this.txtName.TabIndex = 4;
  92
+            // 
  93
+            // txtAlias
  94
+            // 
  95
+            this.txtAlias.Location = new System.Drawing.Point(187, 90);
  96
+            this.txtAlias.Name = "txtAlias";
  97
+            this.txtAlias.Size = new System.Drawing.Size(210, 21);
  98
+            this.txtAlias.TabIndex = 5;
  99
+            // 
  100
+            // cboCard
  101
+            // 
  102
+            this.cboCard.FormattingEnabled = true;
  103
+            this.cboCard.Location = new System.Drawing.Point(187, 131);
  104
+            this.cboCard.Name = "cboCard";
  105
+            this.cboCard.Size = new System.Drawing.Size(154, 20);
  106
+            this.cboCard.TabIndex = 6;
  107
+            // 
  108
+            // cboPost
  109
+            // 
  110
+            this.cboPost.FormattingEnabled = true;
  111
+            this.cboPost.Location = new System.Drawing.Point(187, 170);
  112
+            this.cboPost.Name = "cboPost";
  113
+            this.cboPost.Size = new System.Drawing.Size(154, 20);
  114
+            this.cboPost.TabIndex = 7;
  115
+            // 
  116
+            // dataGridView1
  117
+            // 
  118
+            this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
  119
+            this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
  120
+            this.Column1,
  121
+            this.Column2,
  122
+            this.Column3,
  123
+            this.Column4,
  124
+            this.Column5});
  125
+            this.dataGridView1.Location = new System.Drawing.Point(63, 219);
  126
+            this.dataGridView1.Name = "dataGridView1";
  127
+            this.dataGridView1.RowTemplate.Height = 23;
  128
+            this.dataGridView1.Size = new System.Drawing.Size(587, 150);
  129
+            this.dataGridView1.TabIndex = 8;
  130
+            // 
  131
+            // btnSave
  132
+            // 
  133
+            this.btnSave.Location = new System.Drawing.Point(488, 119);
  134
+            this.btnSave.Name = "btnSave";
  135
+            this.btnSave.Size = new System.Drawing.Size(75, 23);
  136
+            this.btnSave.TabIndex = 9;
  137
+            this.btnSave.Text = "保存";
  138
+            this.btnSave.UseVisualStyleBackColor = true;
  139
+            this.btnSave.Click += new System.EventHandler(this.btnSave_Click);
  140
+            // 
  141
+            // btnCancel
  142
+            // 
  143
+            this.btnCancel.Location = new System.Drawing.Point(488, 167);
  144
+            this.btnCancel.Name = "btnCancel";
  145
+            this.btnCancel.Size = new System.Drawing.Size(75, 23);
  146
+            this.btnCancel.TabIndex = 10;
  147
+            this.btnCancel.Text = "取消";
  148
+            this.btnCancel.UseVisualStyleBackColor = true;
  149
+            this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
  150
+            // 
  151
+            // Column1
  152
+            // 
  153
+            this.Column1.DataPropertyName = "ID";
  154
+            this.Column1.HeaderText = "人员编号";
  155
+            this.Column1.Name = "Column1";
  156
+            // 
  157
+            // Column2
  158
+            // 
  159
+            this.Column2.DataPropertyName = "emName";
  160
+            this.Column2.HeaderText = "名称";
  161
+            this.Column2.Name = "Column2";
  162
+            // 
  163
+            // Column3
  164
+            // 
  165
+            this.Column3.DataPropertyName = "alias";
  166
+            this.Column3.HeaderText = "别名";
  167
+            this.Column3.Name = "Column3";
  168
+            // 
  169
+            // Column4
  170
+            // 
  171
+            this.Column4.DataPropertyName = "Name";
  172
+            this.Column4.HeaderText = "所属卡片";
  173
+            this.Column4.Name = "Column4";
  174
+            // 
  175
+            // Column5
  176
+            // 
  177
+            this.Column5.DataPropertyName = "postName";
  178
+            this.Column5.HeaderText = "所属岗位";
  179
+            this.Column5.Name = "Column5";
  180
+            // 
  181
+            // frmAddEmployee
  182
+            // 
  183
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
  184
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
  185
+            this.ClientSize = new System.Drawing.Size(751, 411);
  186
+            this.Controls.Add(this.btnCancel);
  187
+            this.Controls.Add(this.btnSave);
  188
+            this.Controls.Add(this.dataGridView1);
  189
+            this.Controls.Add(this.cboPost);
  190
+            this.Controls.Add(this.cboCard);
  191
+            this.Controls.Add(this.txtAlias);
  192
+            this.Controls.Add(this.txtName);
  193
+            this.Controls.Add(this.label4);
  194
+            this.Controls.Add(this.label3);
  195
+            this.Controls.Add(this.label2);
  196
+            this.Controls.Add(this.label1);
  197
+            this.Name = "frmAddEmployee";
  198
+            this.Text = "frmEmployeAdde";
  199
+            this.Load += new System.EventHandler(this.frmAddEmployee_Load);
  200
+            ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
  201
+            this.ResumeLayout(false);
  202
+            this.PerformLayout();
  203
+
  204
+        }
  205
+
  206
+        #endregion
  207
+
  208
+        private System.Windows.Forms.Label label1;
  209
+        private System.Windows.Forms.Label label2;
  210
+        private System.Windows.Forms.Label label3;
  211
+        private System.Windows.Forms.Label label4;
  212
+        private System.Windows.Forms.TextBox txtName;
  213
+        private System.Windows.Forms.TextBox txtAlias;
  214
+        private System.Windows.Forms.ComboBox cboCard;
  215
+        private System.Windows.Forms.ComboBox cboPost;
  216
+        private System.Windows.Forms.DataGridView dataGridView1;
  217
+        private System.Windows.Forms.Button btnSave;
  218
+        private System.Windows.Forms.Button btnCancel;
  219
+        private System.Windows.Forms.DataGridViewTextBoxColumn Column1;
  220
+        private System.Windows.Forms.DataGridViewTextBoxColumn Column2;
  221
+        private System.Windows.Forms.DataGridViewTextBoxColumn Column3;
  222
+        private System.Windows.Forms.DataGridViewTextBoxColumn Column4;
  223
+        private System.Windows.Forms.DataGridViewTextBoxColumn Column5;
  224
+    }
  225
+}
93  Application/frmAddEmployee.cs
... ...
@@ -0,0 +1,93 @@
  1
+using System;
  2
+using System.Collections.Generic;
  3
+using System.ComponentModel;
  4
+using System.Data;
  5
+using System.Drawing;
  6
+using System.Linq;
  7
+using System.Text;
  8
+using System.Windows.Forms;
  9
+using System.Data.SqlClient;
  10
+namespace WorkStation
  11
+{
  12
+    public partial class frmAddEmployee : Form
  13
+    {
  14
+        public frmAddEmployee()
  15
+        {
  16
+            InitializeComponent();
  17
+        }
  18
+        private static string sqlConnectionStr = "Data Source=192.168.1.221;Initial Catalog=Patrol;User ID=sa;Password=sa123";      
  19
+        /// <summary>
  20
+        /// 保存
  21
+        /// </summary>
  22
+        /// <param name="sender"></param>
  23
+        /// <param name="e"></param>
  24
+        private void btnSave_Click(object sender, EventArgs e)
  25
+        {           
  26
+            string insertEmpoyee = "insert into Employee(Name,Alias,Rfid_ID) values(@name,@alias,@rfid_id);select  @@identity";
  27
+            string insertEmpoyeePost = "insert into Post_Employee(Employee_ID,ID) values(@em_id,@id)";
  28
+            SqlParameter[] par = new SqlParameter[]{ new SqlParameter("@name",SqlDbType.NVarChar),
  29
+                                                     new SqlParameter("@alias",SqlDbType.NVarChar),
  30
+                                                     new SqlParameter("@rfid_id",SqlDbType.Int) };
  31
+            par[0].Value = this.txtName.Text;
  32
+            par[1].Value = this.txtAlias.Text;
  33
+            par[2].Value = this.cboCard.SelectedValue.ToString();
  34
+            string  id =SqlHelper.ExecuteScalar(sqlConnectionStr, CommandType.Text, insertEmpoyee,par).ToString();
  35
+            if (id != null)
  36
+            {
  37
+                MessageBox.Show("保存成功!");
  38
+            }
  39
+            else
  40
+            {
  41
+                MessageBox.Show("保存失败!");
  42
+            }
  43
+            SqlParameter[] par1 = new SqlParameter[]{ new SqlParameter("@em_id",SqlDbType.Int),             
  44
+                                                      new SqlParameter("@id",SqlDbType.Int) };
  45
+
  46
+            par1[0].Value = id;
  47
+            par1[1].Value = this.cboPost.SelectedValue.ToString();
  48
+            int i = SqlHelper.ExecuteNonQuery(sqlConnectionStr, CommandType.Text, insertEmpoyeePost,par1);
  49
+            BindEmployee(); 
  50
+           
  51
+        }
  52
+        /// <summary>
  53
+        /// 数据绑定
  54
+        /// </summary>
  55
+        public void BindEmployee()
  56
+        {
  57
+            string selectEmployee = "select Employee.ID,Employee.Name emName,Employee.Alias,Rfid.Name,Post.Name  postName from Employee,Rfid,Post,Post_Employee where Employee.ID=Post_Employee.Employee_ID and Employee.Rfid_ID=Rfid.ID and Post_Employee.ID=Post.ID";
  58
+            DataSet ds = SqlHelper.ExecuteDataset(sqlConnectionStr, CommandType.Text, selectEmployee);
  59
+            dataGridView1.DataSource = ds.Tables[0];
  60
+        }
  61
+        /// <summary>
  62
+        /// 取消
  63
+        /// </summary>
  64
+        /// <param name="sender"></param>
  65
+        /// <param name="e"></param>
  66
+        private void btnCancel_Click(object sender, EventArgs e)
  67
+        {
  68
+            this.Close();
  69
+        }
  70
+        /// <summary>
  71
+        /// 数据加载
  72
+        /// </summary>
  73
+        /// <param name="sender"></param>
  74
+        /// <param name="e"></param>
  75
+        private void frmAddEmployee_Load(object sender, EventArgs e)
  76
+        {
  77
+            string selectPost = "select * from Post";
  78
+            DataSet ds = SqlHelper.ExecuteDataset(sqlConnectionStr, CommandType.Text, selectPost);
  79
+            cboPost.DataSource = ds.Tables[0];
  80
+            cboPost.DisplayMember = "Name";
  81
+            cboPost.ValueMember = "ID";
  82
+
  83
+            string selectCard = "select * from Rfid";
  84
+            DataSet dsd = SqlHelper.ExecuteDataset(sqlConnectionStr, CommandType.Text, selectCard);
  85
+            cboCard.DataSource = dsd.Tables[0];
  86
+            cboCard.DisplayMember = "Name";
  87
+            cboCard.ValueMember = "ID";
  88
+
  89
+            BindEmployee();
  90
+
  91
+        }
  92
+    }
  93
+}
135  Application/frmAddEmployee.resx
... ...
@@ -0,0 +1,135 @@
  1
+<?xml version="1.0" encoding="utf-8"?>
  2
+<root>
  3
+  <!-- 
  4
+    Microsoft ResX Schema 
  5
+    
  6
+    Version 2.0
  7
+    
  8
+    The primary goals of this format is to allow a simple XML format 
  9
+    that is mostly human readable. The generation and parsing of the 
  10
+    various data types are done through the TypeConverter classes 
  11
+    associated with the data types.
  12
+    
  13
+    Example:
  14
+    
  15
+    ... ado.net/XML headers & schema ...
  16
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
  17
+    <resheader name="version">2.0</resheader>
  18
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
  19
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
  20
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
  21
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
  22
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
  23
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
  24
+    </data>
  25
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
  26
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
  27
+        <comment>This is a comment</comment>
  28
+    </data>
  29
+                
  30
+    There are any number of "resheader" rows that contain simple 
  31
+    name/value pairs.
  32
+    
  33
+    Each data row contains a name, and value. The row also contains a 
  34
+    type or mimetype. Type corresponds to a .NET class that support 
  35
+    text/value conversion through the TypeConverter architecture. 
  36
+    Classes that don't support this are serialized and stored with the 
  37
+    mimetype set.
  38
+    
  39
+    The mimetype is used for serialized objects, and tells the 
  40
+    ResXResourceReader how to depersist the object. This is currently not 
  41
+    extensible. For a given mimetype the value must be set accordingly:
  42
+    
  43
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
  44
+    that the ResXResourceWriter will generate, however the reader can 
  45
+    read any of the formats listed below.
  46
+    
  47
+    mimetype: application/x-microsoft.net.object.binary.base64
  48
+    value   : The object must be serialized with 
  49
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
  50
+            : and then encoded with base64 encoding.
  51
+    
  52
+    mimetype: application/x-microsoft.net.object.soap.base64
  53
+    value   : The object must be serialized with 
  54
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
  55
+            : and then encoded with base64 encoding.
  56
+
  57
+    mimetype: application/x-microsoft.net.object.bytearray.base64
  58
+    value   : The object must be serialized into a byte array 
  59
+            : using a System.ComponentModel.TypeConverter
  60
+            : and then encoded with base64 encoding.
  61
+    -->
  62
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
  63
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
  64
+    <xsd:element name="root" msdata:IsDataSet="true">
  65
+      <xsd:complexType>
  66
+        <xsd:choice maxOccurs="unbounded">
  67
+          <xsd:element name="metadata">
  68
+            <xsd:complexType>
  69
+              <xsd:sequence>
  70
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
  71
+              </xsd:sequence>
  72
+              <xsd:attribute name="name" use="required" type="xsd:string" />
  73
+              <xsd:attribute name="type" type="xsd:string" />
  74
+              <xsd:attribute name="mimetype" type="xsd:string" />
  75
+              <xsd:attribute ref="xml:space" />
  76
+            </xsd:complexType>
  77
+          </xsd:element>
  78
+          <xsd:element name="assembly">
  79
+            <xsd:complexType>
  80
+              <xsd:attribute name="alias" type="xsd:string" />
  81
+              <xsd:attribute name="name" type="xsd:string" />
  82
+            </xsd:complexType>
  83
+          </xsd:element>
  84
+          <xsd:element name="data">
  85
+            <xsd:complexType>
  86
+              <xsd:sequence>
  87
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
  88
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
  89
+              </xsd:sequence>
  90
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
  91
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
  92
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
  93
+              <xsd:attribute ref="xml:space" />
  94
+            </xsd:complexType>
  95
+          </xsd:element>
  96
+          <xsd:element name="resheader">
  97
+            <xsd:complexType>
  98
+              <xsd:sequence>
  99
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
  100
+              </xsd:sequence>
  101
+              <xsd:attribute name="name" type="xsd:string" use="required" />
  102
+            </xsd:complexType>
  103
+          </xsd:element>
  104
+        </xsd:choice>
  105
+      </xsd:complexType>
  106
+    </xsd:element>
  107
+  </xsd:schema>
  108
+  <resheader name="resmimetype">
  109
+    <value>text/microsoft-resx</value>
  110
+  </resheader>
  111
+  <resheader name="version">
  112
+    <value>2.0</value>
  113
+  </resheader>
  114
+  <resheader name="reader">
  115
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
  116
+  </resheader>
  117
+  <resheader name="writer">
  118
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
  119
+  </resheader>
  120
+  <metadata name="Column1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
  121
+    <value>True</value>
  122
+  </metadata>
  123
+  <metadata name="Column2.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
  124
+    <value>True</value>
  125
+  </metadata>
  126
+  <metadata name="Column3.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
  127
+    <value>True</value>
  128
+  </metadata>
  129
+  <metadata name="Column4.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
  130
+    <value>True</value>
  131
+  </metadata>
  132
+  <metadata name="Column5.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
  133
+    <value>True</value>
  134
+  </metadata>
  135
+</root>
251  Application/frmEditOrDeleteEmployee.Designer.cs
... ...
@@ -0,0 +1,251 @@
  1
+namespace WorkStation
  2
+{
  3
+    partial class frmEditOrDeleteEmployee
  4
+    {
  5
+        /// <summary>
  6
+        /// Required designer variable.
  7
+        /// </summary>
  8
+        private System.ComponentModel.IContainer components = null;
  9
+
  10
+        /// <summary>
  11
+        /// Clean up any resources being used.
  12
+        /// </summary>
  13
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
  14
+        protected override void Dispose(bool disposing)
  15
+        {
  16
+            if (disposing && (components != null))
  17
+            {
  18
+                components.Dispose();
  19
+            }
  20
+            base.Dispose(disposing);
  21
+        }
  22
+
  23
+        #region Windows Form Designer generated code
  24
+
  25
+        /// <summary>
  26
+        /// Required method for Designer support - do not modify
  27
+        /// the contents of this method with the code editor.
  28
+        /// </summary>
  29
+        private void InitializeComponent()
  30
+        {
  31
+            this.dataGridView1 = new System.Windows.Forms.DataGridView();
  32
+            this.Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
  33
+            this.Column2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
  34
+            this.Column3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
  35
+            this.Column4 = new System.Windows.Forms.DataGridViewTextBoxColumn();
  36
+            this.Column5 = new System.Windows.Forms.DataGridViewTextBoxColumn();
  37
+            this.txtAlias = new System.Windows.Forms.TextBox();
  38
+            this.txtName = new System.Windows.Forms.TextBox();
  39
+            this.label2 = new System.Windows.Forms.Label();
  40
+            this.label1 = new System.Windows.Forms.Label();
  41
+            this.cboPost = new System.Windows.Forms.ComboBox();
  42
+            this.cboCard = new System.Windows.Forms.ComboBox();
  43
+            this.label4 = new System.Windows.Forms.Label();
  44
+            this.label3 = new System.Windows.Forms.Label();
  45
+            this.btnCancel = new System.Windows.Forms.Button();
  46
+            this.btnSave = new System.Windows.Forms.Button();
  47
+            this.button1 = new System.Windows.Forms.Button();
  48
+            this.button2 = new System.Windows.Forms.Button();
  49
+            ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
  50
+            this.SuspendLayout();
  51
+            // 
  52
+            // dataGridView1
  53
+            // 
  54
+            this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
  55
+            this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
  56
+            this.Column1,
  57
+            this.Column2,
  58
+            this.Column3,
  59
+            this.Column4,
  60
+            this.Column5});
  61
+            this.dataGridView1.Location = new System.Drawing.Point(31, 29);
  62
+            this.dataGridView1.Name = "dataGridView1";
  63
+            this.dataGridView1.RowTemplate.Height = 23;
  64
+            this.dataGridView1.Size = new System.Drawing.Size(587, 150);
  65
+            this.dataGridView1.TabIndex = 9;
  66
+            // 
  67
+            // Column1
  68
+            // 
  69
+            this.Column1.DataPropertyName = "ID";
  70
+            this.Column1.HeaderText = "人员编号";
  71
+            this.Column1.Name = "Column1";
  72
+            // 
  73
+            // Column2
  74
+            // 
  75
+            this.Column2.DataPropertyName = "emName";
  76
+            this.Column2.HeaderText = "名称";
  77
+            this.Column2.Name = "Column2";
  78
+            // 
  79
+            // Column3
  80
+            // 
  81
+            this.Column3.DataPropertyName = "alias";
  82
+            this.Column3.HeaderText = "别名";
  83
+            this.Column3.Name = "Column3";
  84
+            // 
  85
+            // Column4
  86
+            // 
  87
+            this.Column4.DataPropertyName = "Name";
  88
+            this.Column4.HeaderText = "所属卡片";
  89
+            this.Column4.Name = "Column4";
  90
+            // 
  91
+            // Column5
  92
+            // 
  93
+            this.Column5.DataPropertyName = "postName";
  94
+            this.Column5.HeaderText = "所属岗位";
  95
+            this.Column5.Name = "Column5";
  96
+            // 
  97
+            // txtAlias
  98
+            // 
  99
+            this.txtAlias.Location = new System.Drawing.Point(131, 305);
  100
+            this.txtAlias.Name = "txtAlias";
  101
+            this.txtAlias.Size = new System.Drawing.Size(210, 21);
  102
+            this.txtAlias.TabIndex = 13;
  103
+            // 
  104
+            // txtName
  105
+            // 
  106
+            this.txtName.Location = new System.Drawing.Point(131, 262);
  107
+            this.txtName.Name = "txtName";
  108
+            this.txtName.Size = new System.Drawing.Size(210, 21);
  109
+            this.txtName.TabIndex = 12;
  110
+            // 
  111
+            // label2
  112
+            // 
  113
+            this.label2.AutoSize = true;
  114
+            this.label2.Location = new System.Drawing.Point(58, 308);
  115
+            this.label2.Name = "label2";
  116
+            this.label2.Size = new System.Drawing.Size(29, 12);
  117
+            this.label2.TabIndex = 11;
  118
+            this.label2.Text = "别名";
  119
+            // 
  120
+            // label1
  121
+            // 
  122
+            this.label1.AutoSize = true;
  123
+            this.label1.Location = new System.Drawing.Point(58, 265);
  124
+            this.label1.Name = "label1";
  125
+            this.label1.Size = new System.Drawing.Size(29, 12);
  126
+            this.label1.TabIndex = 10;
  127
+            this.label1.Text = "名称";
  128
+            // 
  129
+            // cboPost
  130
+            // 
  131
+            this.cboPost.FormattingEnabled = true;
  132
+            this.cboPost.Location = new System.Drawing.Point(131, 380);
  133
+            this.cboPost.Name = "cboPost";
  134
+            this.cboPost.Size = new System.Drawing.Size(154, 20);
  135
+            this.cboPost.TabIndex = 17;
  136
+            // 
  137
+            // cboCard
  138
+            // 
  139
+            this.cboCard.FormattingEnabled = true;
  140
+            this.cboCard.Location = new System.Drawing.Point(131, 346);
  141
+            this.cboCard.Name = "cboCard";
  142
+            this.cboCard.Size = new System.Drawing.Size(154, 20);
  143
+            this.cboCard.TabIndex = 16;
  144
+            // 
  145
+            // label4
  146
+            // 
  147
+            this.label4.AutoSize = true;
  148
+            this.label4.Location = new System.Drawing.Point(44, 388);
  149
+            this.label4.Name = "label4";
  150
+            this.label4.Size = new System.Drawing.Size(53, 12);
  151
+            this.label4.TabIndex = 15;
  152
+            this.label4.Text = "所属岗位";
  153
+            // 
  154
+            // label3
  155
+            // 
  156
+            this.label3.AutoSize = true;
  157
+            this.label3.Location = new System.Drawing.Point(44, 349);
  158
+            this.label3.Name = "label3";
  159
+            this.label3.Size = new System.Drawing.Size(53, 12);
  160
+            this.label3.TabIndex = 14;
  161
+            this.label3.Text = "所属卡片";
  162
+            // 
  163
+            // btnCancel
  164
+            // 
  165
+            this.btnCancel.Location = new System.Drawing.Point(383, 377);
  166
+            this.btnCancel.Name = "btnCancel";
  167
+            this.btnCancel.Size = new System.Drawing.Size(75, 23);
  168
+            this.btnCancel.TabIndex = 19;
  169
+            this.btnCancel.Text = "取消";
  170
+            this.btnCancel.UseVisualStyleBackColor = true;
  171
+            this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
  172
+            // 
  173
+            // btnSave
  174
+            // 
  175
+            this.btnSave.Location = new System.Drawing.Point(383, 322);
  176
+            this.btnSave.Name = "btnSave";
  177
+            this.btnSave.Size = new System.Drawing.Size(75, 23);
  178
+            this.btnSave.TabIndex = 18;
  179
+            this.btnSave.Text = "保存";
  180
+            this.btnSave.UseVisualStyleBackColor = true;
  181
+            this.btnSave.Click += new System.EventHandler(this.btnSave_Click);
  182
+            // 
  183
+            // button1
  184
+            // 
  185
+            this.button1.Location = new System.Drawing.Point(428, 202);
  186
+            this.button1.Name = "button1";
  187
+            this.button1.Size = new System.Drawing.Size(75, 23);
  188
+            this.button1.TabIndex = 20;
  189
+            this.button1.Text = "编辑";
  190
+            this.button1.UseVisualStyleBackColor = true;
  191
+            this.button1.Click += new System.EventHandler(this.button1_Click);
  192
+            // 
  193
+            // button2
  194
+            // 
  195
+            this.button2.Location = new System.Drawing.Point(543, 202);
  196
+            this.button2.Name = "button2";
  197
+            this.button2.Size = new System.Drawing.Size(75, 23);
  198
+            this.button2.TabIndex = 21;
  199
+            this.button2.Text = "删除";
  200
+            this.button2.UseVisualStyleBackColor = true;
  201
+            this.button2.Click += new System.EventHandler(this.button2_Click);
  202
+            // 
  203
+            // frmEditOrDeleteEmployee
  204
+            // 
  205
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
  206
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
  207
+            this.ClientSize = new System.Drawing.Size(678, 489);
  208
+            this.Controls.Add(this.button2);
  209
+            this.Controls.Add(this.button1);
  210
+            this.Controls.Add(this.btnCancel);
  211
+            this.Controls.Add(this.btnSave);
  212
+            this.Controls.Add(this.cboPost);
  213
+            this.Controls.Add(this.cboCard);
  214
+            this.Controls.Add(this.label4);
  215
+            this.Controls.Add(this.label3);
  216
+            this.Controls.Add(this.txtAlias);
  217
+            this.Controls.Add(this.txtName);
  218
+            this.Controls.Add(this.label2);
  219
+            this.Controls.Add(this.label1);
  220
+            this.Controls.Add(this.dataGridView1);
  221
+            this.Name = "frmEditOrDeleteEmployee";
  222
+            this.Text = "frmEditOrDeleteEmployee";
  223
+            this.Load += new System.EventHandler(this.frmEditOrDeleteEmployee_Load);
  224
+            ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
  225
+            this.ResumeLayout(false);
  226
+            this.PerformLayout();
  227
+
  228
+        }
  229
+
  230
+        #endregion
  231
+
  232
+        private System.Windows.Forms.DataGridView dataGridView1;
  233
+        private System.Windows.Forms.DataGridViewTextBoxColumn Column1;
  234
+        private System.Windows.Forms.DataGridViewTextBoxColumn Column2;
  235
+        private System.Windows.Forms.DataGridViewTextBoxColumn Column3;
  236
+        private System.Windows.Forms.DataGridViewTextBoxColumn Column4;
  237
+        private System.Windows.Forms.DataGridViewTextBoxColumn Column5;
  238
+        private System.Windows.Forms.TextBox txtAlias;
  239
+        private System.Windows.Forms.TextBox txtName;
  240
+        private System.Windows.Forms.Label label2;
  241
+        private System.Windows.Forms.Label label1;
  242
+        private System.Windows.Forms.ComboBox cboPost;
  243
+        private System.Windows.Forms.ComboBox cboCard;
  244
+        private System.Windows.Forms.Label label4;
  245
+        private System.Windows.Forms.Label label3;
  246
+        private System.Windows.Forms.Button btnCancel;
  247
+        private System.Windows.Forms.Button btnSave;
  248
+        private System.Windows.Forms.Button button1;
  249
+        private System.Windows.Forms.Button button2;
  250
+    }
  251
+}
135  Application/frmEditOrDeleteEmployee.cs
... ...
@@ -0,0 +1,135 @@
  1
+using System;
  2
+using System.Collections.Generic;
  3
+using System.ComponentModel;
  4
+using System.Data;
  5
+using System.Drawing;
  6
+using System.Linq;
  7
+using System.Text;
  8
+using System.Windows.Forms;
  9
+using System.Data.SqlClient;
  10
+namespace WorkStation
  11
+{
  12
+    public partial class frmEditOrDeleteEmployee : Form
  13
+    {
  14
+        public frmEditOrDeleteEmployee()
  15
+        {
  16
+            InitializeComponent();
  17
+        }
  18
+        private static string sqlConnectionStr = "Data Source=192.168.1.221;Initial Catalog=Patrol;User ID=sa;Password=sa123";  
  19
+        /// <summary>
  20
+        /// 编辑
  21
+        /// </summary>
  22
+        /// <param name="sender"></param>
  23
+        /// <param name="e"></param>
  24
+        private void button1_Click(object sender, EventArgs e)
  25
+        {
  26
+            string selectEmpoyee = "select Employee.Name emName,Employee.Alias,Rfid.Name,Post.Name  postName from Employee,Rfid,Post,Post_Employee where Employee.ID=Post_Employee.Employee_ID and Employee.Rfid_ID=Rfid.ID and Post_Employee.ID=Post.ID and Employee.ID=@id";
  27
+            SqlParameter[] par = new SqlParameter[] { new SqlParameter("@id", dataGridView1.SelectedCells[0].Value) };
  28
+            SqlDataReader dr = SqlHelper.ExecuteReader(sqlConnectionStr, CommandType.Text, selectEmpoyee,par);
  29
+            while(dr.Read())
  30
+            {
  31
+                this.txtName.Text = dr[0].ToString();
  32
+                this.txtAlias.Text = dr[1].ToString();
  33
+                this.cboPost.Text = dr[2].ToString();
  34
+                this.cboCard.Text = dr[3].ToString();
  35
+            }
  36
+        }
  37
+        /// <summary>
  38
+        /// 删除
  39
+        /// </summary>
  40
+        /// <param name="sender"></param>
  41
+        /// <param name="e"></param>
  42
+        private void button2_Click(object sender, EventArgs e)
  43
+        {
  44
+            string deleteEmployee = "delete from Employee where ID=@id";
  45
+            SqlParameter[] par = new SqlParameter[] {new SqlParameter("@id",dataGridView1.SelectedCells[0].Value) };
  46
+            int i = SqlHelper.ExecuteNonQuery(deleteEmployee,par);
  47
+            if (i > 0)
  48
+            {
  49
+                MessageBox.Show("删除成功!");
  50
+            }
  51
+            else
  52
+            {
  53
+                MessageBox.Show("删除失败!");
  54
+            }
  55
+            BindEmployee();
  56
+        }
  57
+        /// <summary>
  58
+        /// 更新
  59
+        /// </summary>
  60
+        /// <param name="sender"></param>
  61
+        /// <param name="e"></param>
  62
+        private void btnSave_Click(object sender, EventArgs e)
  63
+        {
  64
+            string UpdateEmployee = "update Employee set Employee.Name=@name,Employee.Alias=@alias,Rfid_ID=@rfid_id where Employee.ID=@id;select  @@identity";
  65
+            SqlParameter[] par = new SqlParameter[]{ new SqlParameter("@id",dataGridView1.SelectedCells[0].Value),
  66
+                                                     new SqlParameter("@name",SqlDbType.NVarChar),
  67
+                                                     new SqlParameter("@alias",SqlDbType.NVarChar),
  68
+                                                     new SqlParameter("@rfid_id",SqlDbType.Int)
  69
+
  70
+
  71
+            };
  72
+            par[1].Value = this.txtName.Text;
  73
+            par[2].Value = this.txtAlias.Text;
  74
+            par[3].Value = this.cboCard.SelectedValue;
  75
+            string a = SqlHelper.ExecuteScalar(sqlConnectionStr,CommandType.Text, UpdateEmployee,par).ToString();
  76
+            if(a!=null)
  77
+            {
  78
+                MessageBox.Show("更新成功!");
  79
+            }
  80
+            else 
  81
+            {
  82
+                MessageBox.Show("更新失败!");
  83
+            }
  84
+            string UpdateEmPost = "update Post_Employee set ID=@id where Employee_ID=@emID";
  85
+            SqlParameter[] par2 = new SqlParameter[]
  86
+            {
  87
+                new SqlParameter("@emID",SqlDbType.Int),
  88
+                new SqlParameter("@id",SqlDbType.Int)
  89
+            };
  90
+            par2[0].Value = dataGridView1.SelectedCells[0].Value;
  91
+            par2[1].Value = cboPost.SelectedValue.ToString() ;
  92
+            int i = SqlHelper.ExecuteNonQuery(UpdateEmPost,par2);
  93
+            BindEmployee();
  94
+        }
  95
+        /// <summary>
  96
+        /// 取消
  97
+        /// </summary>
  98
+        /// <param name="sender"></param>
  99
+        /// <param name="e"></param>
  100
+        private void btnCancel_Click(object sender, EventArgs e)
  101
+        {
  102
+            this.Close();
  103
+        }
  104
+        /// <summary>
  105
+        /// 数据加载
  106
+        /// </summary>
  107
+        /// <param name="sender"></param>
  108
+        /// <param name="e"></param>
  109
+        private void frmEditOrDeleteEmployee_Load(object sender, EventArgs e)
  110
+        {
  111
+            string selectPost = "select * from Post";
  112
+            DataSet ds = SqlHelper.ExecuteDataset(sqlConnectionStr, CommandType.Text, selectPost);
  113
+            cboPost.DataSource = ds.Tables[0];
  114
+            cboPost.DisplayMember = "Name";
  115
+            cboPost.ValueMember = "ID";
  116
+
  117
+            string selectCard = "select * from Rfid";
  118
+            DataSet dsd = SqlHelper.ExecuteDataset(sqlConnectionStr, CommandType.Text, selectCard);
  119
+            cboCard.DataSource = dsd.Tables[0];
  120
+            cboCard.DisplayMember = "Name";
  121
+            cboCard.ValueMember = "ID";
  122
+
  123
+            BindEmployee();
  124
+        }
  125
+        /// <summary>
  126
+        /// 数据绑定
  127
+        /// </summary>
  128
+        public void BindEmployee()
  129
+        {
  130
+            string selectEmployee = "select Employee.ID,Employee.Name emName,Employee.Alias,Rfid.Name,Post.Name  postName from Employee,Rfid,Post,Post_Employee where Employee.ID=Post_Employee.Employee_ID and Employee.Rfid_ID=Rfid.ID and Post_Employee.ID=Post.ID";
  131
+            DataSet ds = SqlHelper.ExecuteDataset(sqlConnectionStr, CommandType.Text, selectEmployee);
  132
+            dataGridView1.DataSource = ds.Tables[0];
  133
+        }
  134
+    }
  135
+}
150  Application/frmEditOrDeleteEmployee.resx
... ...
@@ -0,0 +1,150 @@
  1
+<?xml version="1.0" encoding="utf-8"?>
  2
+<root>
  3
+  <!-- 
  4
+    Microsoft ResX Schema 
  5
+    
  6
+    Version 2.0
  7
+    
  8
+    The primary goals of this format is to allow a simple XML format 
  9
+    that is mostly human readable. The generation and parsing of the 
  10
+    various data types are done through the TypeConverter classes 
  11
+    associated with the data types.
  12
+    
  13
+    Example:
  14
+    
  15
+    ... ado.net/XML headers & schema ...
  16
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
  17
+    <resheader name="version">2.0</resheader>
  18
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
  19
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
  20
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
  21
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
  22
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
  23
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
  24
+    </data>
  25
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
  26
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
  27
+        <comment>This is a comment</comment>
  28
+    </data>
  29
+                
  30
+    There are any number of "resheader" rows that contain simple 
  31
+    name/value pairs.
  32
+    
  33
+    Each data row contains a name, and value. The row also contains a 
  34
+    type or mimetype. Type corresponds to a .NET class that support 
  35
+    text/value conversion through the TypeConverter architecture. 
  36
+    Classes that don't support this are serialized and stored with the 
  37
+    mimetype set.
  38
+    
  39
+    The mimetype is used for serialized objects, and tells the 
  40
+    ResXResourceReader how to depersist the object. This is currently not 
  41
+    extensible. For a given mimetype the value must be set accordingly:
  42
+    
  43
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
  44
+    that the ResXResourceWriter will generate, however the reader can 
  45
+    read any of the formats listed below.
  46
+    
  47
+    mimetype: application/x-microsoft.net.object.binary.base64
  48
+    value   : The object must be serialized with 
  49
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
  50
+            : and then encoded with base64 encoding.
  51
+    
  52
+    mimetype: application/x-microsoft.net.object.soap.base64
  53
+    value   : The object must be serialized with 
  54
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
  55
+            : and then encoded with base64 encoding.
  56
+
  57
+    mimetype: application/x-microsoft.net.object.bytearray.base64
  58
+    value   : The object must be serialized into a byte array 
  59
+            : using a System.ComponentModel.TypeConverter
  60
+            : and then encoded with base64 encoding.
  61
+    -->
  62
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
  63
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
  64
+    <xsd:element name="root" msdata:IsDataSet="true">
  65
+      <xsd:complexType>
  66
+        <xsd:choice maxOccurs="unbounded">
  67
+          <xsd:element name="metadata">
  68
+            <xsd:complexType>
  69
+              <xsd:sequence>
  70
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
  71
+              </xsd:sequence>
  72
+              <xsd:attribute name="name" use="required" type="xsd:string" />
  73
+              <xsd:attribute name="type" type="xsd:string" />
  74
+              <xsd:attribute name="mimetype" type="xsd:string" />
  75
+              <xsd:attribute ref="xml:space" />
  76
+            </xsd:complexType>
  77
+          </xsd:element>
  78
+          <xsd:element name="assembly">
  79
+            <xsd:complexType>
  80
+              <xsd:attribute name="alias" type="xsd:string" />
  81
+              <xsd:attribute name="name" type="xsd:string" />
  82
+            </xsd:complexType>
  83
+          </xsd:element>
  84
+          <xsd:element name="data">
  85
+            <xsd:complexType>
  86
+              <xsd:sequence>
  87
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
  88
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
  89
+              </xsd:sequence>
  90
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
  91
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
  92
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
  93
+              <xsd:attribute ref="xml:space" />
  94
+            </xsd:complexType>
  95
+          </xsd:element>
  96
+          <xsd:element name="resheader">
  97
+            <xsd:complexType>
  98
+              <xsd:sequence>
  99
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
  100
+              </xsd:sequence>
  101
+              <xsd:attribute name="name" type="xsd:string" use="required" />
  102
+            </xsd:complexType>
  103
+          </xsd:element>
  104
+        </xsd:choice>
  105
+      </xsd:complexType>
  106
+    </xsd:element>
  107
+  </xsd:schema>
  108
+  <resheader name="resmimetype">
  109
+    <value>text/microsoft-resx</value>
  110
+  </resheader>
  111
+  <resheader name="version">
  112
+    <value>2.0</value>
  113
+  </resheader>
  114
+  <resheader name="reader">
  115
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
  116
+  </resheader>
  117
+  <resheader name="writer">
  118
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
  119
+  </resheader>
  120
+  <metadata name="Column1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
  121
+    <value>True</value>
  122
+  </metadata>
  123
+  <metadata name="Column2.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
  124
+    <value>True</value>
  125
+  </metadata>
  126
+  <metadata name="Column3.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
  127
+    <value>True</value>
  128
+  </metadata>
  129
+  <metadata name="Column4.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
  130
+    <value>True</value>
  131
+  </metadata>
  132
+  <metadata name="Column5.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
  133
+    <value>True</value>
  134
+  </metadata>
  135
+  <metadata name="Column1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
  136
+    <value>True</value>
  137
+  </metadata>
  138
+  <metadata name="Column2.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
  139
+    <value>True</value>
  140
+  </metadata>
  141
+  <metadata name="Column3.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
  142
+    <value>True</value>
  143
+  </metadata>
  144
+  <metadata name="Column4.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
  145
+    <value>True</value>
  146
+  </metadata>
  147
+  <metadata name="Column5.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
  148
+    <value>True</value>
  149
+  </metadata>
  150
+</root>
9  Application/frmMain.Designer.cs
@@ -657,8 +657,9 @@ private void InitializeComponent()
657 657
             // tsmixinjian
658 658
             // 
659 659
             this.tsmixinjian.Name = "tsmixinjian";
660  
-            this.tsmixinjian.Size = new System.Drawing.Size(94, 22);
  660
+            this.tsmixinjian.Size = new System.Drawing.Size(152, 22);
661 661
             this.tsmixinjian.Text = "新建";
  662
+            this.tsmixinjian.Click += new System.EventHandler(this.tsmixinjian_Click);
662 663
             // 
663 664
             // tsmibianji
664 665
             // 
@@ -689,8 +690,9 @@ private void InitializeComponent()
689 690
             // tsmixinjian1
690 691
             // 
691 692
             this.tsmixinjian1.Name = "tsmixinjian1";
692  
-            this.tsmixinjian1.Size = new System.Drawing.Size(94, 22);
  693
+            this.tsmixinjian1.Size = new System.Drawing.Size(152, 22);
693 694
             this.tsmixinjian1.Text = "新建";