Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge remote-tracking branch 'weiyunbing/Develop'

Conflicts:
	Application/Program.cs
	Application/WorkStation.csproj
	Application/frmMain.cs
  • Loading branch information...
commit 09d0f4922379969997822b9fed47c2a9468c7854 2 parents a2a8604 + ebae449
@hefangli hefangli authored
Showing with 9,684 additions and 1,534 deletions.
  1. +22 −0 Application/Code/CommonClass.cs.orig
  2. +16 −25 Application/Code/SqlHelper.cs
  3. +4,772 −0 Application/Code/SqlHelper.cs.orig
  4. +0 −271 Application/Main.Designer.cs
  5. +0 −20 Application/Main.cs
  6. +0 −208 Application/Main.resx
  7. +1 −1  Application/Program.cs
  8. +1 −2  Application/Program.cs.orig
  9. +37 −1 Application/Properties/Settings.Designer.cs
  10. +45 −25 Application/Properties/Settings.Designer.cs.orig
  11. +10 −1 Application/Properties/Settings.settings
  12. +37 −0 Application/Properties/Settings.settings.orig
  13. +27 −35 Application/WorkStation.csproj
  14. +271 −9 Application/WorkStation.csproj.orig
  15. +18 −1 Application/app.config
  16. +35 −0 Application/app.config.orig
  17. +0 −1  Application/frmAddCard.cs
  18. +271 −234 Application/frmAddItem.Designer.cs
  19. +186 −1 Application/frmAddItem.cs
  20. +232 −0 Application/frmAddItem.cs.orig
  21. +125 −119 Application/frmAddItem.resx
  22. +198 −0 Application/frmAddMachine.Designer.cs
  23. +136 −0 Application/frmAddMachine.cs
  24. +123 −0 Application/frmAddMachine.resx
  25. +82 −54 Application/frmAddPoint.Designer.cs
  26. +213 −0 Application/frmAddPoint.Designer.cs.orig
  27. +123 −2 Application/frmAddPoint.cs
  28. +178 −0 Application/frmAddPoint.cs.orig
  29. +125 −119 Application/frmAddPoint.resx
  30. +169 −0 Application/frmAddRoutName.Designer.cs
  31. +99 −0 Application/frmAddRoutName.cs
  32. +122 −0 Application/frmAddRoutName.cs.orig
  33. +120 −0 Application/frmAddRoutName.resx
  34. +284 −144 Application/frmAddRoute.Designer.cs
  35. +487 −0 Application/frmAddRoute.Designer.cs.orig
  36. +486 −19 Application/frmAddRoute.cs
  37. +490 −0 Application/frmAddRoute.cs.orig
  38. +122 −119 Application/frmAddRoute.resx
  39. +0 −19 Application/frmAddTask.Designer.cs
  40. +1 −94 Application/frmAddTask.cs
  41. +0 −1  Application/frmEditOrDeleteTask.Designer.cs
  42. +0 −4 Application/frmEditOrDeleteTask.cs
  43. +6 −2 Application/{frmain.Designer.cs → frmMain.Designer.cs}
  44. +14 −3 Application/{frmain.cs → frmMain.cs}
  45. 0  Application/{frmain.resx → frmMain.resx}
  46. 0  提交.txt
  47. 0  新建 文本文档.txt
View
22 Application/Code/CommonClass.cs.orig
@@ -0,0 +1,22 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace WorkStation
+{
+ public class CommonClass
+ {
+ }
+ public class BoxItem
+ {
+ private string _text = null;
+ private object _value = null;
+ public string Text { get { return this._text; } set { this._text = value; } }
+ public object Value { get { return this._value; } set { this._value = value; } }
+ public override string ToString()
+ {
+ return this._text;
+ }
+ }
+}
View
41 Application/Code/SqlHelper.cs
@@ -175,7 +175,7 @@ private static void PrepareCommand(SqlCommand command, SqlConnection connection,
/// <returns></returns>
public static int ExecuteNonQuery(string commandText)
{
- return ExecuteNonQuery(sqlConnectionStr,CommandType.Text,commandText);
+ return ExecuteNonQuery(sqlConnectionStr,CommandType.Text,commandText,(SqlParameter[])null);
}
/// <summary>
/// 执行但参数的sql数据
@@ -187,21 +187,19 @@ public static int ExecuteNonQuery(string commandText, params SqlParameter[] comm
{
return ExecuteNonQuery(sqlConnectionStr, CommandType.Text, commandText,commandParameters);
}
+
/// <summary>
- /// 执行指定连接字符串,类型的SqlCommand.
+ /// 执行存储过程
/// </summary>
- /// <remarks>
- /// 示例:
- /// int result = ExecuteNonQuery(connString, CommandType.StoredProcedure, "PublishOrders");
- /// </remarks>
- /// <param name="connectionString">一个有效的数据库连接字符串</param>
- /// <param name="commandType">命令类型 (存储过程,命令文本, 其它.)</param>
- /// <param name="commandText">存储过程名称或SQL语句</param>
- /// <returns>返回命令影响的行数</returns>
- public static int ExecuteNonQuery(string connectionString, CommandType commandType, string commandText)
+ /// <param name="spName"></param>
+ /// <param name="commandType"></param>
+ /// <param name="parameterValues"></param>
+ /// <returns></returns>
+ public static int ExecuteNonQuery(string spName, CommandType commandType, params SqlParameter[] parameterValues)
{
- return ExecuteNonQuery(connectionString, commandType, commandText, (SqlParameter[])null);
- }
+ return ExecuteNonQuery(sqlConnectionStr, CommandType.StoredProcedure, spName, parameterValues);
+ }
+
/// <summary>
/// 执行指定连接字符串,类型的SqlCommand.如果没有提供参数,不返回结果.
@@ -225,16 +223,13 @@ public static int ExecuteNonQuery(string connectionString, CommandType commandTy
}
}
+
+
/// <summary>
- /// 执行指定连接字符串的存储过程,将对象数组的值赋给存储过程参数,
+ ///执行指定连接字符串的存储过程,将对象数组的值赋给存储过程参数,
/// 此方法需要在参数缓存方法中探索参数并生成参数.
/// </summary>
- /// <remarks>
- /// 这个方法没有提供访问输出参数和返回值.
- /// 示例:
- /// int result = ExecuteNonQuery(connString, "PublishOrders", 24, 36);
- /// </remarks>
- /// <param name="connectionString">一个有效的数据库连接字符串/param>
+ /// <param name="connectionString">一个有效的数据库连接字符串</param>
/// <param name="spName">存储过程名称</param>
/// <param name="parameterValues">分配到存储过程输入参数的对象数组</param>
/// <returns>返回受影响的行数</returns>
@@ -338,14 +333,10 @@ public static int ExecuteNonQuery(SqlConnection connection, string spName, param
/// <summary>
/// 执行带事务的SqlCommand.
/// </summary>
- /// <remarks>
- /// 示例.:
- /// int result = ExecuteNonQuery(trans, CommandType.StoredProcedure, "PublishOrders");
- /// </remarks>
/// <param name="transaction">一个有效的数据库连接对象</param>
/// <param name="commandType">命令类型(存储过程,命令文本或其它.)</param>
/// <param name="commandText">存储过程名称或T-SQL语句</param>
- /// <returns>返回影响的行数/returns>
+ /// <returns>返回影响的行数</returns>
public static int ExecuteNonQuery(SqlTransaction transaction, CommandType commandType, string commandText)
{
return ExecuteNonQuery(transaction, commandType, commandText, (SqlParameter[])null);
View
4,772 Application/Code/SqlHelper.cs.orig
4,772 additions, 0 deletions not shown
View
271 Application/Main.Designer.cs
@@ -1,271 +0,0 @@
-namespace WorkStation
-{
- partial class Main
- {
- /// <summary>
- /// 必需的设计器变量。
- /// </summary>
- private System.ComponentModel.IContainer components = null;
-
- /// <summary>
- /// 清理所有正在使用的资源。
- /// </summary>
- /// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
- protected override void Dispose(bool disposing)
- {
- if (disposing && (components != null))
- {
- components.Dispose();
- }
- base.Dispose(disposing);
- }
-
- #region Windows 窗体设计器生成的代码
-
- /// <summary>
- /// 设计器支持所需的方法 - 不要
- /// 使用代码编辑器修改此方法的内容。
- /// </summary>
- private void InitializeComponent()
- {
- System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Main));
- this.menuStrip1 = new System.Windows.Forms.MenuStrip();
- this.巡检项模板ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.任务管理ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.统计报表ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.巡检信息ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.基础信息ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.卡片管理ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.帮助ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.toolStripContainer1 = new System.Windows.Forms.ToolStripContainer();
- this.toolStrip1 = new System.Windows.Forms.ToolStrip();
- this.toolStripButton1 = new System.Windows.Forms.ToolStripButton();
- this.toolStripButton2 = new System.Windows.Forms.ToolStripButton();
- this.toolStripButton3 = new System.Windows.Forms.ToolStripButton();
- this.toolStripButton4 = new System.Windows.Forms.ToolStripButton();
- this.treeView1 = new System.Windows.Forms.TreeView();
- this.statusStrip1 = new System.Windows.Forms.StatusStrip();
- this.toolStripProgressBar1 = new System.Windows.Forms.ToolStripProgressBar();
- this.toolStripDropDownButton1 = new System.Windows.Forms.ToolStripDropDownButton();
- this.menuStrip1.SuspendLayout();
- this.toolStripContainer1.BottomToolStripPanel.SuspendLayout();
- this.toolStripContainer1.ContentPanel.SuspendLayout();
- this.toolStripContainer1.TopToolStripPanel.SuspendLayout();
- this.toolStripContainer1.SuspendLayout();
- this.toolStrip1.SuspendLayout();
- this.statusStrip1.SuspendLayout();
- this.SuspendLayout();
- //
- // menuStrip1
- //
- this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
- this.巡检项模板ToolStripMenuItem,
- this.任务管理ToolStripMenuItem,
- this.统计报表ToolStripMenuItem,
- this.巡检信息ToolStripMenuItem,
- this.基础信息ToolStripMenuItem,
- this.卡片管理ToolStripMenuItem,
- this.帮助ToolStripMenuItem});
- this.menuStrip1.Location = new System.Drawing.Point(0, 0);
- this.menuStrip1.Name = "menuStrip1";
- this.menuStrip1.Size = new System.Drawing.Size(1029, 25);
- this.menuStrip1.TabIndex = 1;
- this.menuStrip1.Text = "menuStrip1";
- //
- // 巡检项模板ToolStripMenuItem
- //
- this.巡检项模板ToolStripMenuItem.Name = "巡检项模板ToolStripMenuItem";
- this.巡检项模板ToolStripMenuItem.Size = new System.Drawing.Size(95, 21);
- this.巡检项模板ToolStripMenuItem.Text = "巡检项模板(&T)";
- //
- // 任务管理ToolStripMenuItem
- //
- this.任务管理ToolStripMenuItem.Name = "任务管理ToolStripMenuItem";
- this.任务管理ToolStripMenuItem.Size = new System.Drawing.Size(84, 21);
- this.任务管理ToolStripMenuItem.Text = "任务管理(&A)";
- //
- // 统计报表ToolStripMenuItem
- //
- this.统计报表ToolStripMenuItem.Name = "统计报表ToolStripMenuItem";
- this.统计报表ToolStripMenuItem.Size = new System.Drawing.Size(84, 21);
- this.统计报表ToolStripMenuItem.Text = "统计报表(&R)";
- //
- // 巡检信息ToolStripMenuItem
- //
- this.巡检信息ToolStripMenuItem.Name = "巡检信息ToolStripMenuItem";
- this.巡检信息ToolStripMenuItem.Size = new System.Drawing.Size(80, 21);
- this.巡检信息ToolStripMenuItem.Text = "巡检信息(&I)";
- //
- // 基础信息ToolStripMenuItem
- //
- this.基础信息ToolStripMenuItem.Name = "基础信息ToolStripMenuItem";
- this.基础信息ToolStripMenuItem.Size = new System.Drawing.Size(84, 21);
- this.基础信息ToolStripMenuItem.Text = "基础信息(&B)";
- //
- // 卡片管理ToolStripMenuItem
- //
- this.卡片管理ToolStripMenuItem.Name = "卡片管理ToolStripMenuItem";
- this.卡片管理ToolStripMenuItem.Size = new System.Drawing.Size(84, 21);
- this.卡片管理ToolStripMenuItem.Text = "卡片管理(&C)";
- //
- // 帮助ToolStripMenuItem
- //
- this.帮助ToolStripMenuItem.Name = "帮助ToolStripMenuItem";
- this.帮助ToolStripMenuItem.Size = new System.Drawing.Size(61, 21);
- this.帮助ToolStripMenuItem.Text = "帮助(&H)";
- //
- // toolStripContainer1
- //
- //
- // toolStripContainer1.BottomToolStripPanel
- //
- this.toolStripContainer1.BottomToolStripPanel.Controls.Add(this.statusStrip1);
- //
- // toolStripContainer1.ContentPanel
- //
- this.toolStripContainer1.ContentPanel.Controls.Add(this.treeView1);
- this.toolStripContainer1.ContentPanel.Size = new System.Drawing.Size(1029, 353);
- this.toolStripContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
- this.toolStripContainer1.Location = new System.Drawing.Point(0, 25);
- this.toolStripContainer1.Name = "toolStripContainer1";
- this.toolStripContainer1.Size = new System.Drawing.Size(1029, 400);
- this.toolStripContainer1.TabIndex = 3;
- this.toolStripContainer1.Text = "toolStripContainer1";
- //
- // toolStripContainer1.TopToolStripPanel
- //
- this.toolStripContainer1.TopToolStripPanel.Controls.Add(this.toolStrip1);
- //
- // toolStrip1
- //
- this.toolStrip1.Dock = System.Windows.Forms.DockStyle.None;
- this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
- this.toolStripButton1,
- this.toolStripButton2,
- this.toolStripButton3,
- this.toolStripButton4});
- this.toolStrip1.Location = new System.Drawing.Point(3, 0);
- this.toolStrip1.Name = "toolStrip1";
- this.toolStrip1.Size = new System.Drawing.Size(204, 25);
- this.toolStrip1.TabIndex = 0;
- //
- // toolStripButton1
- //
- this.toolStripButton1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
- this.toolStripButton1.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton1.Image")));
- this.toolStripButton1.ImageTransparentColor = System.Drawing.Color.Magenta;
- this.toolStripButton1.Name = "toolStripButton1";
- this.toolStripButton1.Size = new System.Drawing.Size(23, 22);
- this.toolStripButton1.Text = "toolStripButton1";
- //
- // toolStripButton2
- //
- this.toolStripButton2.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
- this.toolStripButton2.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton2.Image")));
- this.toolStripButton2.ImageTransparentColor = System.Drawing.Color.Magenta;
- this.toolStripButton2.Name = "toolStripButton2";
- this.toolStripButton2.Size = new System.Drawing.Size(23, 22);
- this.toolStripButton2.Text = "toolStripButton2";
- //
- // toolStripButton3
- //
- this.toolStripButton3.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton3.Image")));
- this.toolStripButton3.ImageTransparentColor = System.Drawing.Color.Magenta;
- this.toolStripButton3.Name = "toolStripButton3";
- this.toolStripButton3.Size = new System.Drawing.Size(123, 22);
- this.toolStripButton3.Text = "toolStripButton3";
- //
- // toolStripButton4
- //
- this.toolStripButton4.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
- this.toolStripButton4.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton4.Image")));
- this.toolStripButton4.ImageTransparentColor = System.Drawing.Color.Magenta;
- this.toolStripButton4.Name = "toolStripButton4";
- this.toolStripButton4.Size = new System.Drawing.Size(23, 22);
- this.toolStripButton4.Text = "toolStripButton4";
- //
- // treeView1
- //
- this.treeView1.Location = new System.Drawing.Point(3, 3);
- this.treeView1.Name = "treeView1";
- this.treeView1.Size = new System.Drawing.Size(121, 97);
- this.treeView1.TabIndex = 0;
- //
- // statusStrip1
- //
- this.statusStrip1.Dock = System.Windows.Forms.DockStyle.None;
- this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
- this.toolStripProgressBar1,
- this.toolStripDropDownButton1});
- this.statusStrip1.Location = new System.Drawing.Point(0, 0);
- this.statusStrip1.Name = "statusStrip1";
- this.statusStrip1.Size = new System.Drawing.Size(1029, 22);
- this.statusStrip1.TabIndex = 0;
- //
- // toolStripProgressBar1
- //
- this.toolStripProgressBar1.Name = "toolStripProgressBar1";
- this.toolStripProgressBar1.Size = new System.Drawing.Size(100, 16);
- //
- // toolStripDropDownButton1
- //
- this.toolStripDropDownButton1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
- this.toolStripDropDownButton1.Image = ((System.Drawing.Image)(resources.GetObject("toolStripDropDownButton1.Image")));
- this.toolStripDropDownButton1.ImageTransparentColor = System.Drawing.Color.Magenta;
- this.toolStripDropDownButton1.Name = "toolStripDropDownButton1";
- this.toolStripDropDownButton1.Size = new System.Drawing.Size(29, 20);
- this.toolStripDropDownButton1.Text = "toolStripDropDownButton1";
- //
- // Main
- //
- this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
- this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size(1029, 425);
- this.Controls.Add(this.toolStripContainer1);
- this.Controls.Add(this.menuStrip1);
- this.IsMdiContainer = true;
- this.MainMenuStrip = this.menuStrip1;
- this.Name = "Main";
- this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
- this.Text = "RFID智能巡检系统";
- this.menuStrip1.ResumeLayout(false);
- this.menuStrip1.PerformLayout();
- this.toolStripContainer1.BottomToolStripPanel.ResumeLayout(false);
- this.toolStripContainer1.BottomToolStripPanel.PerformLayout();
- this.toolStripContainer1.ContentPanel.ResumeLayout(false);
- this.toolStripContainer1.TopToolStripPanel.ResumeLayout(false);
- this.toolStripContainer1.TopToolStripPanel.PerformLayout();
- this.toolStripContainer1.ResumeLayout(false);
- this.toolStripContainer1.PerformLayout();
- this.toolStrip1.ResumeLayout(false);
- this.toolStrip1.PerformLayout();
- this.statusStrip1.ResumeLayout(false);
- this.statusStrip1.PerformLayout();
- this.ResumeLayout(false);
- this.PerformLayout();
-
- }
-
- #endregion
-
- private System.Windows.Forms.MenuStrip menuStrip1;
- private System.Windows.Forms.ToolStripMenuItem 巡检项模板ToolStripMenuItem;
- private System.Windows.Forms.ToolStripMenuItem 任务管理ToolStripMenuItem;
- private System.Windows.Forms.ToolStripMenuItem 统计报表ToolStripMenuItem;
- private System.Windows.Forms.ToolStripMenuItem 巡检信息ToolStripMenuItem;
- private System.Windows.Forms.ToolStripMenuItem 基础信息ToolStripMenuItem;
- private System.Windows.Forms.ToolStripMenuItem 卡片管理ToolStripMenuItem;
- private System.Windows.Forms.ToolStripMenuItem 帮助ToolStripMenuItem;
- private System.Windows.Forms.ToolStripContainer toolStripContainer1;
- private System.Windows.Forms.ToolStrip toolStrip1;
- private System.Windows.Forms.ToolStripButton toolStripButton1;
- private System.Windows.Forms.ToolStripButton toolStripButton2;
- private System.Windows.Forms.ToolStripButton toolStripButton3;
- private System.Windows.Forms.ToolStripButton toolStripButton4;
- private System.Windows.Forms.TreeView treeView1;
- private System.Windows.Forms.StatusStrip statusStrip1;
- private System.Windows.Forms.ToolStripProgressBar toolStripProgressBar1;
- private System.Windows.Forms.ToolStripDropDownButton toolStripDropDownButton1;
- }
-}
-
View
20 Application/Main.cs
@@ -1,20 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Data;
-using System.Drawing;
-using System.Linq;
-using System.Text;
-using System.Windows.Forms;
-
-namespace WorkStation
-{
- public partial class Main : Form
- {
- public Main()
- {
- InitializeComponent();
- }
-
- }
-}
View
208 Application/Main.resx
@@ -1,208 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<root>
- <!--
- Microsoft ResX Schema
-
- Version 2.0
-
- The primary goals of this format is to allow a simple XML format
- that is mostly human readable. The generation and parsing of the
- various data types are done through the TypeConverter classes
- associated with the data types.
-
- Example:
-
- ... ado.net/XML headers & schema ...
- <resheader name="resmimetype">text/microsoft-resx</resheader>
- <resheader name="version">2.0</resheader>
- <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
- <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
- <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
- <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
- <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
- <value>[base64 mime encoded serialized .NET Framework object]</value>
- </data>
- <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
- <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
- <comment>This is a comment</comment>
- </data>
-
- There are any number of "resheader" rows that contain simple
- name/value pairs.
-
- Each data row contains a name, and value. The row also contains a
- type or mimetype. Type corresponds to a .NET class that support
- text/value conversion through the TypeConverter architecture.
- Classes that don't support this are serialized and stored with the
- mimetype set.
-
- The mimetype is used for serialized objects, and tells the
- ResXResourceReader how to depersist the object. This is currently not
- extensible. For a given mimetype the value must be set accordingly:
-
- Note - application/x-microsoft.net.object.binary.base64 is the format
- that the ResXResourceWriter will generate, however the reader can
- read any of the formats listed below.
-
- mimetype: application/x-microsoft.net.object.binary.base64
- value : The object must be serialized with
- : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
- : and then encoded with base64 encoding.
-
- mimetype: application/x-microsoft.net.object.soap.base64
- value : The object must be serialized with
- : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
- : and then encoded with base64 encoding.
-
- mimetype: application/x-microsoft.net.object.bytearray.base64
- value : The object must be serialized into a byte array
- : using a System.ComponentModel.TypeConverter
- : and then encoded with base64 encoding.
- -->
- <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
- <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
- <xsd:element name="root" msdata:IsDataSet="true">
- <xsd:complexType>
- <xsd:choice maxOccurs="unbounded">
- <xsd:element name="metadata">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" />
- </xsd:sequence>
- <xsd:attribute name="name" use="required" type="xsd:string" />
- <xsd:attribute name="type" type="xsd:string" />
- <xsd:attribute name="mimetype" type="xsd:string" />
- <xsd:attribute ref="xml:space" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="assembly">
- <xsd:complexType>
- <xsd:attribute name="alias" type="xsd:string" />
- <xsd:attribute name="name" type="xsd:string" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="data">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
- <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
- <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
- <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
- <xsd:attribute ref="xml:space" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="resheader">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required" />
- </xsd:complexType>
- </xsd:element>
- </xsd:choice>
- </xsd:complexType>
- </xsd:element>
- </xsd:schema>
- <resheader name="resmimetype">
- <value>text/microsoft-resx</value>
- </resheader>
- <resheader name="version">
- <value>2.0</value>
- </resheader>
- <resheader name="reader">
- <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </resheader>
- <resheader name="writer">
- <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </resheader>
- <metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
- <value>18, -1</value>
- </metadata>
- <metadata name="statusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
- <value>358, -1</value>
- </metadata>
- <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
- <data name="toolStripDropDownButton1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
- <value>
- iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
- YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIISURBVDhPpZP7S1NxGMbPPxKaXVUkMEq8IpKUCoY/hGgI
- ymqkDYYXcCjDZOANURSjCNGFQUTsl4GXVMxKk62YU4fXQpaIlygHQxBRH8/zwvyaIAYe+HLgnPN8nue9
- HA3nvDTq63oW/jm13XOwvPTB3DYFY5MH+bXfcN8ygfTSMSSXfESicQDxBqdYHwH29g9w2tnZ3UcguIvN
- rR3417exuBJE5N1n/wfwLgXEOc38Bc6xNRHb+/y4nm49G0Bnit2zf9H6bkliE/jKuYxrd6oVgDWfjB+K
- TWeKMyrGEVfowITvD9re/9ABVQrAhh0HHK+ZselMMaN/mvwtDb+aVqkA7HYIwIj3ysfluPTorJnP6Ezx
- oHsD1s5ZXEktUwCOioB5f1CEPR9+wTG6iuiserTo8dkwng7HT/R+XUPF8xlcTjErAOdMcW6NW8STiwG8
- 7vej8oUPN/PsEv3t8Ao0TZP3T1u8uJRkUgAuSYHtO97oLxmXd5t9Ho8aPTK+GzntqNfrLm2fFoihwYOI
- xGIF4KjoGBLzY1OrF9k6OOFxnwDC4wxIMX1G0pMhgVyMNyoA13PAtS7OrJk1PrC69LUdQWxuF6IybHrX
- LRI7JrtZdoDAo1XmbjMyD+tjSXxGcXRmnYg5ttD9QuxDhN0uUgDOmbvNTpPOJaGAo2K36cyaGZvOFIfd
- KlSA8/zRh9ABIDUG+1JpAAAAAElFTkSuQmCC
-</value>
- </data>
- <metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
- <value>138, -1</value>
- </metadata>
- <data name="toolStripButton1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
- <value>
- iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
- YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIISURBVDhPpZP7S1NxGMbPPxKaXVUkMEq8IpKUCoY/hGgI
- ymqkDYYXcCjDZOANURSjCNGFQUTsl4GXVMxKk62YU4fXQpaIlygHQxBRH8/zwvyaIAYe+HLgnPN8nue9
- HA3nvDTq63oW/jm13XOwvPTB3DYFY5MH+bXfcN8ygfTSMSSXfESicQDxBqdYHwH29g9w2tnZ3UcguIvN
- rR3417exuBJE5N1n/wfwLgXEOc38Bc6xNRHb+/y4nm49G0Bnit2zf9H6bkliE/jKuYxrd6oVgDWfjB+K
- TWeKMyrGEVfowITvD9re/9ABVQrAhh0HHK+ZselMMaN/mvwtDb+aVqkA7HYIwIj3ysfluPTorJnP6Ezx
- oHsD1s5ZXEktUwCOioB5f1CEPR9+wTG6iuiserTo8dkwng7HT/R+XUPF8xlcTjErAOdMcW6NW8STiwG8
- 7vej8oUPN/PsEv3t8Ao0TZP3T1u8uJRkUgAuSYHtO97oLxmXd5t9Ho8aPTK+GzntqNfrLm2fFoihwYOI
- xGIF4KjoGBLzY1OrF9k6OOFxnwDC4wxIMX1G0pMhgVyMNyoA13PAtS7OrJk1PrC69LUdQWxuF6IybHrX
- LRI7JrtZdoDAo1XmbjMyD+tjSXxGcXRmnYg5ttD9QuxDhN0uUgDOmbvNTpPOJaGAo2K36cyaGZvOFIfd
- KlSA8/zRh9ABIDUG+1JpAAAAAElFTkSuQmCC
-</value>
- </data>
- <data name="toolStripButton2.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
- <value>
- iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
- YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIISURBVDhPpZP7S1NxGMbPPxKaXVUkMEq8IpKUCoY/hGgI
- ymqkDYYXcCjDZOANURSjCNGFQUTsl4GXVMxKk62YU4fXQpaIlygHQxBRH8/zwvyaIAYe+HLgnPN8nue9
- HA3nvDTq63oW/jm13XOwvPTB3DYFY5MH+bXfcN8ygfTSMSSXfESicQDxBqdYHwH29g9w2tnZ3UcguIvN
- rR3417exuBJE5N1n/wfwLgXEOc38Bc6xNRHb+/y4nm49G0Bnit2zf9H6bkliE/jKuYxrd6oVgDWfjB+K
- TWeKMyrGEVfowITvD9re/9ABVQrAhh0HHK+ZselMMaN/mvwtDb+aVqkA7HYIwIj3ysfluPTorJnP6Ezx
- oHsD1s5ZXEktUwCOioB5f1CEPR9+wTG6iuiserTo8dkwng7HT/R+XUPF8xlcTjErAOdMcW6NW8STiwG8
- 7vej8oUPN/PsEv3t8Ao0TZP3T1u8uJRkUgAuSYHtO97oLxmXd5t9Ho8aPTK+GzntqNfrLm2fFoihwYOI
- xGIF4KjoGBLzY1OrF9k6OOFxnwDC4wxIMX1G0pMhgVyMNyoA13PAtS7OrJk1PrC69LUdQWxuF6IybHrX
- LRI7JrtZdoDAo1XmbjMyD+tjSXxGcXRmnYg5ttD9QuxDhN0uUgDOmbvNTpPOJaGAo2K36cyaGZvOFIfd
- KlSA8/zRh9ABIDUG+1JpAAAAAElFTkSuQmCC
-</value>
- </data>
- <data name="toolStripButton3.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
- <value>
- iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
- YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIISURBVDhPpZP7S1NxGMbPPxKaXVUkMEq8IpKUCoY/hGgI
- ymqkDYYXcCjDZOANURSjCNGFQUTsl4GXVMxKk62YU4fXQpaIlygHQxBRH8/zwvyaIAYe+HLgnPN8nue9
- HA3nvDTq63oW/jm13XOwvPTB3DYFY5MH+bXfcN8ygfTSMSSXfESicQDxBqdYHwH29g9w2tnZ3UcguIvN
- rR3417exuBJE5N1n/wfwLgXEOc38Bc6xNRHb+/y4nm49G0Bnit2zf9H6bkliE/jKuYxrd6oVgDWfjB+K
- TWeKMyrGEVfowITvD9re/9ABVQrAhh0HHK+ZselMMaN/mvwtDb+aVqkA7HYIwIj3ysfluPTorJnP6Ezx
- oHsD1s5ZXEktUwCOioB5f1CEPR9+wTG6iuiserTo8dkwng7HT/R+XUPF8xlcTjErAOdMcW6NW8STiwG8
- 7vej8oUPN/PsEv3t8Ao0TZP3T1u8uJRkUgAuSYHtO97oLxmXd5t9Ho8aPTK+GzntqNfrLm2fFoihwYOI
- xGIF4KjoGBLzY1OrF9k6OOFxnwDC4wxIMX1G0pMhgVyMNyoA13PAtS7OrJk1PrC69LUdQWxuF6IybHrX
- LRI7JrtZdoDAo1XmbjMyD+tjSXxGcXRmnYg5ttD9QuxDhN0uUgDOmbvNTpPOJaGAo2K36cyaGZvOFIfd
- KlSA8/zRh9ABIDUG+1JpAAAAAElFTkSuQmCC
-</value>
- </data>
- <data name="toolStripButton4.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
- <value>
- iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
- YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIISURBVDhPpZP7S1NxGMbPPxKaXVUkMEq8IpKUCoY/hGgI
- ymqkDYYXcCjDZOANURSjCNGFQUTsl4GXVMxKk62YU4fXQpaIlygHQxBRH8/zwvyaIAYe+HLgnPN8nue9
- HA3nvDTq63oW/jm13XOwvPTB3DYFY5MH+bXfcN8ygfTSMSSXfESicQDxBqdYHwH29g9w2tnZ3UcguIvN
- rR3417exuBJE5N1n/wfwLgXEOc38Bc6xNRHb+/y4nm49G0Bnit2zf9H6bkliE/jKuYxrd6oVgDWfjB+K
- TWeKMyrGEVfowITvD9re/9ABVQrAhh0HHK+ZselMMaN/mvwtDb+aVqkA7HYIwIj3ysfluPTorJnP6Ezx
- oHsD1s5ZXEktUwCOioB5f1CEPR9+wTG6iuiserTo8dkwng7HT/R+XUPF8xlcTjErAOdMcW6NW8STiwG8
- 7vej8oUPN/PsEv3t8Ao0TZP3T1u8uJRkUgAuSYHtO97oLxmXd5t9Ho8aPTK+GzntqNfrLm2fFoihwYOI
- xGIF4KjoGBLzY1OrF9k6OOFxnwDC4wxIMX1G0pMhgVyMNyoA13PAtS7OrJk1PrC69LUdQWxuF6IybHrX
- LRI7JrtZdoDAo1XmbjMyD+tjSXxGcXRmnYg5ttD9QuxDhN0uUgDOmbvNTpPOJaGAo2K36cyaGZvOFIfd
- KlSA8/zRh9ABIDUG+1JpAAAAAElFTkSuQmCC
-</value>
- </data>
- <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
- <value>28</value>
- </metadata>
-</root>
View
2  Application/Program.cs
@@ -14,7 +14,7 @@ static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
- Application.Run(new frmain());
+ Application.Run(new frmMain());
}
}
}
View
3  Application/Program.cs.orig
@@ -2,7 +2,6 @@
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
-
namespace WorkStation
{
static class Program
@@ -15,7 +14,7 @@ namespace WorkStation
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
- Application.Run(new Main());
+ Application.Run(new frmMain());
}
}
}
View
38 Application/Properties/Settings.Designer.cs
@@ -13,7 +13,7 @@ namespace WorkStation.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
- internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
+ public sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
@@ -32,5 +32,41 @@ internal sealed partial class Settings : global::System.Configuration.Applicatio
return ((string)(this["ConnectionString"]));
}
}
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("True")]
+ public bool tvRoute {
+ get {
+ return ((bool)(this["tvRoute"]));
+ }
+ set {
+ this["tvRoute"] = value;
+ }
+ }
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("True")]
+ public bool tvLogicalPoint {
+ get {
+ return ((bool)(this["tvLogicalPoint"]));
+ }
+ set {
+ this["tvLogicalPoint"] = value;
+ }
+ }
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("True")]
+ public bool tvPhysicalPoint {
+ get {
+ return ((bool)(this["tvPhysicalPoint"]));
+ }
+ set {
+ this["tvPhysicalPoint"] = value;
+ }
+ }
}
}
View
70 Application/Properties/Settings.Designer.cs.orig
@@ -1,8 +1,7 @@
-<<<<<<< HEAD
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
-// 运行时版本:4.0.30319.17929
+// 运行时版本:4.0.30319.269
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
@@ -14,7 +13,7 @@ namespace WorkStation.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
- internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
+ public sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
@@ -23,33 +22,54 @@ namespace WorkStation.Properties {
return defaultInstance;
}
}
- }
-}
+
+ [global::System.Configuration.ApplicationScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.ConnectionString)]
+ [global::System.Configuration.DefaultSettingValueAttribute("Data Source=192.168.1.221;Initial Catalog=Patrol;UserId=sa;Password=sa123")]
+ public string ConnectionString {
+ get {
+ return ((string)(this["ConnectionString"]));
+ }
+ }
+<<<<<<< HEAD
=======
-//------------------------------------------------------------------------------
-// <auto-generated>
-// 此代码由工具生成。
-// 运行时版本:4.0.30319.269
-//
-// 对此文件的更改可能会导致不正确的行为,并且如果
-// 重新生成代码,这些更改将会丢失。
-// </auto-generated>
-//------------------------------------------------------------------------------
-
-namespace Application.Properties {
-
-
- [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
- internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
- private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("True")]
+ public bool tvRoute {
+ get {
+ return ((bool)(this["tvRoute"]));
+ }
+ set {
+ this["tvRoute"] = value;
+ }
+ }
- public static Settings Default {
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("True")]
+ public bool tvLogicalPoint {
get {
- return defaultInstance;
+ return ((bool)(this["tvLogicalPoint"]));
+ }
+ set {
+ this["tvLogicalPoint"] = value;
+ }
+ }
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("True")]
+ public bool tvPhysicalPoint {
+ get {
+ return ((bool)(this["tvPhysicalPoint"]));
+ }
+ set {
+ this["tvPhysicalPoint"] = value;
}
}
+>>>>>>> qicb/Develop
}
}
->>>>>>> hefl
View
11 Application/Properties/Settings.settings
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='utf-8'?>
-<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="DAL.Properties" GeneratedClassName="Settings">
+<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="WorkStation.Properties" GeneratedClassName="Settings">
<Profiles />
<Settings>
<Setting Name="ConnectionString" Type="(Connection string)" Scope="Application">
@@ -9,5 +9,14 @@
&lt;/SerializableConnectionString&gt;</DesignTimeValue>
<Value Profile="(Default)">Data Source=192.168.1.221;Initial Catalog=Patrol;UserId=sa;Password=sa123</Value>
</Setting>
+ <Setting Name="tvRoute" Type="System.Boolean" Scope="User">
+ <Value Profile="(Default)">True</Value>
+ </Setting>
+ <Setting Name="tvLogicalPoint" Type="System.Boolean" Scope="User">
+ <Value Profile="(Default)">True</Value>
+ </Setting>
+ <Setting Name="tvPhysicalPoint" Type="System.Boolean" Scope="User">
+ <Value Profile="(Default)">True</Value>
+ </Setting>
</Settings>
</SettingsFile>
View
37 Application/Properties/Settings.settings.orig
@@ -0,0 +1,37 @@
+<<<<<<< HEAD
+<?xml version='1.0' encoding='utf-8'?>
+<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="DAL.Properties" GeneratedClassName="Settings">
+ <Profiles />
+ <Settings>
+ <Setting Name="ConnectionString" Type="(Connection string)" Scope="Application">
+ <DesignTimeValue Profile="(Default)">&lt;?xml version="1.0" encoding="utf-16"?&gt;
+&lt;SerializableConnectionString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
+ &lt;ConnectionString&gt;Data Source=192.168.1.221;Initial Catalog=Patrol;UserId=sa;Password=sa123&lt;/ConnectionString&gt;
+&lt;/SerializableConnectionString&gt;</DesignTimeValue>
+ <Value Profile="(Default)">Data Source=192.168.1.221;Initial Catalog=Patrol;UserId=sa;Password=sa123</Value>
+ </Setting>
+ </Settings>
+=======
+<?xml version='1.0' encoding='utf-8'?>
+<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="WorkStation.Properties" GeneratedClassName="Settings">
+ <Profiles />
+ <Settings>
+ <Setting Name="ConnectionString" Type="(Connection string)" Scope="Application">
+ <DesignTimeValue Profile="(Default)">&lt;?xml version="1.0" encoding="utf-16"?&gt;
+&lt;SerializableConnectionString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
+ &lt;ConnectionString&gt;Data Source=192.168.1.221;Initial Catalog=Patrol;UserId=sa;Password=sa123&lt;/ConnectionString&gt;
+&lt;/SerializableConnectionString&gt;</DesignTimeValue>
+ <Value Profile="(Default)">Data Source=192.168.1.221;Initial Catalog=Patrol;UserId=sa;Password=sa123</Value>
+ </Setting>
+ <Setting Name="tvRoute" Type="System.Boolean" Scope="User">
+ <Value Profile="(Default)">True</Value>
+ </Setting>
+ <Setting Name="tvLogicalPoint" Type="System.Boolean" Scope="User">
+ <Value Profile="(Default)">True</Value>
+ </Setting>
+ <Setting Name="tvPhysicalPoint" Type="System.Boolean" Scope="User">
+ <Value Profile="(Default)">True</Value>
+ </Setting>
+ </Settings>
+>>>>>>> qicb/Develop
+</SettingsFile>
View
62 Application/WorkStation.csproj
@@ -82,17 +82,23 @@
<Compile Include="frmAddRoute.Designer.cs">
<DependentUpon>frmAddRoute.cs</DependentUpon>
</Compile>
- <Compile Include="frmAddTask.cs">
+ <Compile Include="frmAddRoutName.cs">
<SubType>Form</SubType>
</Compile>
- <Compile Include="frmAddTask.Designer.cs">
- <DependentUpon>frmAddTask.cs</DependentUpon>
+ <Compile Include="frmAddRoutName.Designer.cs">
+ <DependentUpon>frmAddRoutName.cs</DependentUpon>
</Compile>
- <Compile Include="frmain.cs">
+ <Compile Include="frmAddMachine.cs">
<SubType>Form</SubType>
</Compile>
- <Compile Include="frmain.Designer.cs">
- <DependentUpon>frmain.cs</DependentUpon>
+ <Compile Include="frmAddMachine.Designer.cs">
+ <DependentUpon>frmAddMachine.cs</DependentUpon>
+ </Compile>
+ <Compile Include="frmAddTask.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="frmAddTask.Designer.cs">
+ <DependentUpon>frmAddTask.cs</DependentUpon>
</Compile>
<Compile Include="frmAddItem.cs">
<SubType>Form</SubType>
@@ -160,20 +166,14 @@
<Compile Include="frmIssueTask.Designer.cs">
<DependentUpon>frmIssueTask.cs</DependentUpon>
</Compile>
- <Compile Include="Program.cs" />
- <Compile Include="Properties\AssemblyInfo.cs" />
- <Compile Include="SiteEditDelete.cs">
+ <Compile Include="frmMain.cs">
<SubType>Form</SubType>
</Compile>
- <Compile Include="SiteEditDelete.Designer.cs">
- <DependentUpon>SiteEditDelete.cs</DependentUpon>
- </Compile>
- <Compile Include="SiteNew.cs">
- <SubType>Form</SubType>
- </Compile>
- <Compile Include="SiteNew.Designer.cs">
- <DependentUpon>SiteNew.cs</DependentUpon>
+ <Compile Include="frmMain.Designer.cs">
+ <DependentUpon>frmMain.cs</DependentUpon>
</Compile>
+ <Compile Include="Program.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="frmAddCard.resx">
<DependentUpon>frmAddCard.cs</DependentUpon>
</EmbeddedResource>
@@ -189,12 +189,15 @@
<EmbeddedResource Include="frmAddRoute.resx">
<DependentUpon>frmAddRoute.cs</DependentUpon>
</EmbeddedResource>
+ <EmbeddedResource Include="frmAddRoutName.resx">
+ <DependentUpon>frmAddRoutName.cs</DependentUpon>
+ </EmbeddedResource>
+ <EmbeddedResource Include="frmAddMachine.resx">
+ <DependentUpon>frmAddMachine.cs</DependentUpon>
+ </EmbeddedResource>
<EmbeddedResource Include="frmAddTask.resx">
<DependentUpon>frmAddTask.cs</DependentUpon>
</EmbeddedResource>
- <EmbeddedResource Include="frmain.resx">
- <DependentUpon>frmain.cs</DependentUpon>
- </EmbeddedResource>
<EmbeddedResource Include="frmAddItem.resx">
<DependentUpon>frmAddItem.cs</DependentUpon>
</EmbeddedResource>
@@ -228,6 +231,9 @@
<EmbeddedResource Include="frmIssueTask.resx">
<DependentUpon>frmIssueTask.cs</DependentUpon>
</EmbeddedResource>
+ <EmbeddedResource Include="frmMain.resx">
+ <DependentUpon>frmMain.cs</DependentUpon>
+ </EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
@@ -238,21 +244,13 @@
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
- <EmbeddedResource Include="SiteEditDelete.resx">
- <DependentUpon>SiteEditDelete.cs</DependentUpon>
- </EmbeddedResource>
- <EmbeddedResource Include="SiteNew.resx">
- <DependentUpon>SiteNew.cs</DependentUpon>
- </EmbeddedResource>
<None Include="app.config" />
- <None Include="ClassDiagram1.cd" />
<None Include="ClassDiagram2.cd" />
<None Include="ClassDiagram3.cd" />
<None Include="ClassDiagram4.cd" />
<None Include="Properties\Settings.settings">
- <Generator>SettingsSingleFileGenerator</Generator>
+ <Generator>PublicSettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
- <SubType>Designer</SubType>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
@@ -297,12 +295,6 @@
<Content Include="picture\确定1.bmp" />
<Content Include="picture\确定2.bmp" />
</ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\Model\Model.csproj">
- <Project>{274882FC-F42C-4969-9BA1-EE5CBF5C37A0}</Project>
- <Name>Model</Name>
- </ProjectReference>
- </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
View
280 Application/WorkStation.csproj.orig
@@ -1,3 +1,4 @@
+<<<<<<< HEAD
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
@@ -37,6 +38,7 @@
<Reference Include="Microsoft.VisualBasic" />
<Reference Include="Microsoft.VisualBasic.PowerPacks.Vs, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
<Reference Include="System" />
+ <Reference Include="System.configuration" />
<Reference Include="System.Core" />
<Reference Include="System.ServiceProcess" />
<Reference Include="System.Windows.Forms" />
@@ -49,12 +51,257 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
- <Compile Include="Main.cs">
+ <Compile Include="Code\CommonClass.cs" />
+ <Compile Include="Code\SqlHelper.cs" />
+ <Compile Include="frmAddCard.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="frmAddCard.Designer.cs">
+ <DependentUpon>frmAddCard.cs</DependentUpon>
+ </Compile>
+ <Compile Include="frmAddPoint.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="frmAddPoint.Designer.cs">
+ <DependentUpon>frmAddPoint.cs</DependentUpon>
+ </Compile>
+ <Compile Include="frmAddRoute.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="frmAddRoute.Designer.cs">
+ <DependentUpon>frmAddRoute.cs</DependentUpon>
+ </Compile>
+ <Compile Include="frmAddTask.cs">
<SubType>Form</SubType>
</Compile>
- <Compile Include="Main.Designer.cs">
- <DependentUpon>Main.cs</DependentUpon>
+ <Compile Include="frmAddTask.Designer.cs">
+ <DependentUpon>frmAddTask.cs</DependentUpon>
+ </Compile>
+ <Compile Include="frmMain.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="frmMain.Designer.cs">
+ <DependentUpon>frmMain.cs</DependentUpon>
+ </Compile>
+ <Compile Include="frmAddItem.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="frmAddItem.Designer.cs">
+ <DependentUpon>frmAddItem.cs</DependentUpon>
</Compile>
+ <Compile Include="frmEditAndDeleteCard.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="frmEditAndDeleteCard.Designer.cs">
+ <DependentUpon>frmEditAndDeleteCard.cs</DependentUpon>
+ </Compile>
+ <Compile Include="frmEditOrDeleteItem.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="frmEditOrDeleteItem.Designer.cs">
+ <DependentUpon>frmEditOrDeleteItem.cs</DependentUpon>
+ </Compile>
+ <Compile Include="frmEditOrDeletePoint.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="frmEditOrDeletePoint.Designer.cs">
+ <DependentUpon>frmEditOrDeletePoint.cs</DependentUpon>
+ </Compile>
+ <Compile Include="frmEditOrDeleteRoute.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="frmEditOrDeleteRoute.Designer.cs">
+ <DependentUpon>frmEditOrDeleteRoute.cs</DependentUpon>
+ </Compile>
+ <Compile Include="frmEditOrDeleteTask.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="frmEditOrDeleteTask.Designer.cs">
+ <DependentUpon>frmEditOrDeleteTask.cs</DependentUpon>
+ </Compile>
+ <Compile Include="frmIssueTask.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="frmIssueTask.Designer.cs">
+ <DependentUpon>frmIssueTask.cs</DependentUpon>
+ </Compile>
+ <Compile Include="Program.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="SiteEditDelete.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="SiteEditDelete.Designer.cs">
+ <DependentUpon>SiteEditDelete.cs</DependentUpon>
+ </Compile>
+ <Compile Include="SiteNew.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="SiteNew.Designer.cs">
+ <DependentUpon>SiteNew.cs</DependentUpon>
+ </Compile>
+ <EmbeddedResource Include="frmAddCard.resx">
+ <DependentUpon>frmAddCard.cs</DependentUpon>
+ </EmbeddedResource>
+ <EmbeddedResource Include="frmAddPoint.resx">
+ <DependentUpon>frmAddPoint.cs</DependentUpon>
+ </EmbeddedResource>
+ <EmbeddedResource Include="frmAddRoute.resx">
+ <DependentUpon>frmAddRoute.cs</DependentUpon>
+ </EmbeddedResource>
+ <EmbeddedResource Include="frmAddTask.resx">
+ <DependentUpon>frmAddTask.cs</DependentUpon>
+ </EmbeddedResource>
+ <EmbeddedResource Include="frmMain.resx">
+ <DependentUpon>frmMain.cs</DependentUpon>
+ </EmbeddedResource>
+ <EmbeddedResource Include="frmAddItem.resx">
+ <DependentUpon>frmAddItem.cs</DependentUpon>
+ </EmbeddedResource>
+ <EmbeddedResource Include="frmEditAndDeleteCard.resx">
+ <DependentUpon>frmEditAndDeleteCard.cs</DependentUpon>
+ </EmbeddedResource>
+ <EmbeddedResource Include="frmEditOrDeleteItem.resx">
+ <DependentUpon>frmEditOrDeleteItem.cs</DependentUpon>
+ </EmbeddedResource>
+ <EmbeddedResource Include="frmEditOrDeletePoint.resx">
+ <DependentUpon>frmEditOrDeletePoint.cs</DependentUpon>
+ </EmbeddedResource>
+ <EmbeddedResource Include="frmEditOrDeleteRoute.resx">
+ <DependentUpon>frmEditOrDeleteRoute.cs</DependentUpon>
+ </EmbeddedResource>
+ <EmbeddedResource Include="frmEditOrDeleteTask.resx">
+ <DependentUpon>frmEditOrDeleteTask.cs</DependentUpon>
+ </EmbeddedResource>
+ <EmbeddedResource Include="frmIssueTask.resx">
+ <DependentUpon>frmIssueTask.cs</DependentUpon>
+ </EmbeddedResource>
+ <EmbeddedResource Include="Properties\Resources.resx">
+ <Generator>ResXFileCodeGenerator</Generator>
+ <LastGenOutput>Resources.Designer.cs</LastGenOutput>
+ <SubType>Designer</SubType>
+ </EmbeddedResource>
+ <Compile Include="Properties\Resources.Designer.cs">
+ <AutoGen>True</AutoGen>
+ <DependentUpon>Resources.resx</DependentUpon>
+ <DesignTime>True</DesignTime>
+ </Compile>
+ <EmbeddedResource Include="SiteEditDelete.resx">
+ <DependentUpon>SiteEditDelete.cs</DependentUpon>
+ </EmbeddedResource>
+ <EmbeddedResource Include="SiteNew.resx">
+ <DependentUpon>SiteNew.cs</DependentUpon>
+ </EmbeddedResource>
+ <None Include="app.config" />
+ <None Include="ClassDiagram1.cd" />
+ <None Include="Properties\Settings.settings">
+ <Generator>SettingsSingleFileGenerator</Generator>
+ <LastGenOutput>Settings.Designer.cs</LastGenOutput>
+ <SubType>Designer</SubType>
+ </None>
+ <Compile Include="Properties\Settings.Designer.cs">
+ <AutoGen>True</AutoGen>
+ <DependentUpon>Settings.settings</DependentUpon>
+ <DesignTimeSharedInput>True</DesignTimeSharedInput>
+ </Compile>
+ </ItemGroup>
+ <ItemGroup>
+ <Content Include="picture\001.bmp" />
+ <Content Include="picture\002.bmp" />
+ <Content Include="picture\003.bmp" />
+ <Content Include="picture\004.bmp" />
+ <Content Include="picture\01.gif" />
+ <Content Include="picture\094.GIF" />
+ <Content Include="picture\096.GIF" />
+ <Content Include="picture\130.GIF" />
+ <Content Include="picture\1381ContentsButton.ico" />
+ <Content Include="picture\27.gif" />
+ <Content Include="picture\34.gif" />
+ <Content Include="picture\b087.gif" />
+ <Content Include="picture\ContentsButton.ico" />
+ <Content Include="picture\icon17.gif" />
+ <Content Include="picture\ic_download.gif" />
+ <Content Include="picture\kksd1183_9_m.gif" />
+ <Content Include="picture\login.gif" />
+ <Content Include="picture\picture\003.bmp" />
+ <Content Include="picture\picture\004.bmp" />
+ <Content Include="picture\picture\icon17.gif" />
+ <Content Include="picture\picture\TabAdvertisement.bmp" />
+ <Content Include="picture\picture\TabAppendix.bmp" />
+ <Content Include="picture\picture\TabIndex.bmp" />
+ <Content Include="picture\picture\TabSentence.bmp" />
+ <Content Include="picture\TabAdvertisement.bmp" />
+ <Content Include="picture\TabAppendix.bmp" />
+ <Content Include="picture\TabIndex.bmp" />
+ <Content Include="picture\TabSentence.bmp" />
+ <Content Include="picture\TabWizard.bmp" />
+ <Content Include="picture\u=3720357200,1595926406&amp;fm=0&amp;gp=20.jpg" />
+ <Content Include="picture\WB02085_.GIF" />
+ <Content Include="picture\取消1.bmp" />
+ <Content Include="picture\取消2.bmp" />
+ <Content Include="picture\确定1.bmp" />
+ <Content Include="picture\确定2.bmp" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\Model\Model.csproj">
+ <Project>{274882FC-F42C-4969-9BA1-EE5CBF5C37A0}</Project>
+ <Name>Model</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+=======
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
+ <ProductVersion>8.0.30703</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{7E891505-264A-413F-B105-8AAE7A0E326A}</ProjectGuid>
+ <OutputType>WinExe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>WorkStation</RootNamespace>
+ <AssemblyName>WorkStation</AssemblyName>
+ <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+ <TargetFrameworkProfile>Client</TargetFrameworkProfile>
+ <FileAlignment>512</FileAlignment>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+ <PlatformTarget>x86</PlatformTarget>
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+ <PlatformTarget>x86</PlatformTarget>
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="Microsoft.VisualBasic" />
+ <Reference Include="Microsoft.VisualBasic.PowerPacks.Vs, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
+ <Reference Include="System" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.ServiceProcess" />
+ <Reference Include="System.Windows.Forms" />
+ <Reference Include="System.Xml.Linq" />
+ <Reference Include="System.Data.DataSetExtensions" />
+ <Reference Include="Microsoft.CSharp" />
+ <Reference Include="System.Data" />
+ <Reference Include="System.Deployment" />
+ <Reference Include="System.Drawing" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Code\CommonClass.cs" />
+ <Compile Include="Code\SqlHelper.cs" />
<Compile Include="frmAddCard.cs">
<SubType>Form</SubType>
</Compile>
@@ -73,6 +320,18 @@
<Compile Include="frmAddRoute.Designer.cs">
<DependentUpon>frmAddRoute.cs</DependentUpon>
</Compile>
+ <Compile Include="frmAddRoutName.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="frmAddRoutName.Designer.cs">
+ <DependentUpon>frmAddRoutName.cs</DependentUpon>
+ </Compile>
+ <Compile Include="frmAddMachine.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="frmAddMachine.Designer.cs">
+ <DependentUpon>frmAddMachine.cs</DependentUpon>
+ </Compile>
<Compile Include="frmAddTask.cs">
<SubType>Form</SubType>
</Compile>
@@ -129,10 +388,6 @@
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
-<<<<<<< HEAD:Application/WorkStation.csproj
- <EmbeddedResource Include="Main.resx">
- <DependentUpon>Main.cs</DependentUpon>
-=======
<EmbeddedResource Include="frmAddCard.resx">
<DependentUpon>frmAddCard.cs</DependentUpon>
</EmbeddedResource>
@@ -142,6 +397,12 @@
<EmbeddedResource Include="frmAddRoute.resx">
<DependentUpon>frmAddRoute.cs</DependentUpon>
</EmbeddedResource>
+ <EmbeddedResource Include="frmAddRoutName.resx">
+ <DependentUpon>frmAddRoutName.cs</DependentUpon>
+ </EmbeddedResource>
+ <EmbeddedResource Include="frmAddMachine.resx">
+ <DependentUpon>frmAddMachine.cs</DependentUpon>
+ </EmbeddedResource>
<EmbeddedResource Include="frmAddTask.resx">
<DependentUpon>frmAddTask.cs</DependentUpon>
</EmbeddedResource>
@@ -168,7 +429,6 @@
</EmbeddedResource>
<EmbeddedResource Include="frmIssueTask.resx">
<DependentUpon>frmIssueTask.cs</DependentUpon>
->>>>>>> hefl:Application/Application.csproj
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
@@ -180,8 +440,9 @@
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
+ <None Include="app.config" />
<None Include="Properties\Settings.settings">
- <Generator>SettingsSingleFileGenerator</Generator>
+ <Generator>PublicSettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
@@ -228,6 +489,7 @@
<Content Include="picture\确定2.bmp" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+>>>>>>> qicb/Develop
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
View
19 Application/app.config
@@ -1,8 +1,25 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
+ <sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
+ <section name="WorkStation.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
+ </sectionGroup>
</configSections>
<connectionStrings>
- <add name="WorkStation.Properties.Settings.ConnectionString" connectionString="Data Source=192.168.1.221;Initial Catalog=Patrol;UserId=sa;Password=sa123" />
+ <add name="WorkStation.Properties.Settings.ConnectionString"
+ connectionString="Data Source=192.168.1.221;Initial Catalog=Patrol;UserId=sa;Password=sa123" />
</connectionStrings>
+ <userSettings>
+ <WorkStation.Properties.Settings>
+ <setting name="tvRoute" serializeAs="String">
+ <value>True</value>
+ </setting>
+ <setting name="tvLogicalPoint" serializeAs="String">
+ <value>True</value>
+ </setting>
+ <setting name="tvPhysicalPoint" serializeAs="String">
+ <value>True</value>
+ </setting>
+ </WorkStation.Properties.Settings>
+ </userSettings>
</configuration>
View
35 Application/app.config.orig
@@ -0,0 +1,35 @@
+<<<<<<< HEAD
+<?xml version="1.0" encoding="utf-8" ?>
+<configuration>
+ <configSections>
+ </configSections>
+ <connectionStrings>
+ <add name="WorkStation.Properties.Settings.ConnectionString" connectionString="Data Source=192.168.1.221;Initial Catalog=Patrol;UserId=sa;Password=sa123" />
+ </connectionStrings>
+=======
+<?xml version="1.0" encoding="utf-8" ?>
+<configuration>
+ <configSections>
+ <sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
+ <section name="WorkStation.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
+ </sectionGroup>
+ </configSections>
+ <connectionStrings>
+ <add name="WorkStation.Properties.Settings.ConnectionString"
+ connectionString="Data Source=192.168.1.221;Initial Catalog=Patrol;UserId=sa;Password=sa123" />
+ </connectionStrings>
+ <userSettings>
+ <WorkStation.Properties.Settings>
+ <setting name="tvRoute" serializeAs="String">
+ <value>True</value>
+ </setting>
+ <setting name="tvLogicalPoint" serializeAs="String">
+ <value>True</value>
+ </setting>
+ <setting name="tvPhysicalPoint" serializeAs="String">
+ <value>True</value>
+ </setting>
+ </WorkStation.Properties.Settings>
+ </userSettings>
+>>>>>>> qicb/Develop
+</configuration>
View
1  Application/frmAddCard.cs
@@ -7,7 +7,6 @@
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
-using Model;
using WorkStation;
using System.Configuration;
namespace WorkStation
View
505 Application/frmAddItem.Designer.cs
@@ -1,235 +1,272 @@
-namespace WorkStation
-{
- partial class frmAddItem
- {
- /// <summary>
- /// Required designer variable.
- /// </summary>
- private System.ComponentModel.IContainer components = null;
-
- /// <summary>
- /// Clean up any resources being used.
- /// </summary>
- /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
- protected override void Dispose(bool disposing)
- {
- if (disposing && (components != null))
- {
- components.Dispose();
- }
- base.Dispose(disposing);
- }
-
- #region Windows Form Designer generated code
-
- /// <summary>
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- /// </summary>
- private void InitializeComponent()
- {
- this.lblName = new System.Windows.Forms.Label();
- this.txtName = new System.Windows.Forms.TextBox();
- this.lblAlias = new System.Windows.Forms.Label();
- this.lblValue = new System.Windows.Forms.Label();
- this.lblPoints = new System.Windows.Forms.Label();
- this.lblRemarks = new System.Windows.Forms.Label();
- this.txtAlias = new System.Windows.Forms.TextBox();
- this.cboValue = new System.Windows.Forms.ComboBox();
- this.txtRemarks = new System.Windows.Forms.TextBox();
- this.comboBox1 = new System.Windows.Forms.ComboBox();
- this.btnSave = new System.Windows.Forms.Button();
- this.listView1 = new System.Windows.Forms.ListView();
- this.columnHeader1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
- this.columnHeader2 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
- this.columnHeader3 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
- this.columnHeader4 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
- this.columnHeader5 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
- this.columnHeader6 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
- this.SuspendLayout();
- //
- // lblName
- //
- this.lblName.AutoSize = true;
- this.lblName.Location = new System.Drawing.Point(161, 46);
- this.lblName.Name = "lblName";
- this.lblName.Size = new System.Drawing.Size(29, 12);
- this.lblName.TabIndex = 0;
- this.lblName.Text = "名称";
- //
- // txtName
- //
- this.txtName.Location = new System.Drawing.Point(232, 37);
- this.txtName.Name = "txtName";
- this.txtName.Size = new System.Drawing.Size(173, 21);
- this.txtName.TabIndex = 1;
- //
- // lblAlias
- //
- this.lblAlias.AutoSize = true;
- this.lblAlias.Location = new System.Drawing.Point(161, 78);
- this.lblAlias.Name = "lblAlias";
- this.lblAlias.Size = new System.Drawing.Size(29, 12);
- this.lblAlias.TabIndex = 2;
- this.lblAlias.Text = "别名";
- //
- // lblValue
- //
- this.lblValue.AutoSize = true;
- this.lblValue.Location = new System.Drawing.Point(149, 117);
- this.lblValue.Name = "lblValue";
- this.lblValue.Size = new System.Drawing.Size(41, 12);
- this.lblValue.TabIndex = 3;
- this.lblValue.Text = "值类型";
- //
- // lblPoints
- //
- this.lblPoints.AutoSize = true;
- this.lblPoints.Location = new System.Drawing.Point(125, 162);
- this.lblPoints.Name = "lblPoints";
- this.lblPoints.Size = new System.Drawing.Size(65, 12);
- this.lblPoints.TabIndex = 4;
- this.lblPoints.Text = "所属巡检点";
- //
- // lblRemarks
- //
- this.lblRemarks.AutoSize = true;
- this.lblRemarks.Location = new System.Drawing.Point(161, 230);
- this.lblRemarks.Name = "lblRemarks";
- this.lblRemarks.Size = new System.Drawing.Size(29, 12);
- this.lblRemarks.TabIndex = 5;
- this.lblRemarks.Text = "备注";
- //
- // txtAlias
- //
- this.txtAlias.Location = new System.Drawing.Point(232, 69);
- this.txtAlias.Name = "txtAlias";
- this.txtAlias.Size = new System.Drawing.Size(173, 21);
- this.txtAlias.TabIndex = 6;
- //
- // cboValue
- //
- this.cboValue.FormattingEnabled = true;
- this.cboValue.Items.AddRange(new object[] {
- "正常/不正常",
- "数值"});
- this.cboValue.Location = new System.Drawing.Point(232, 109);
- this.cboValue.Name = "cboValue";
- this.cboValue.Size = new System.Drawing.Size(171, 20);
- this.cboValue.TabIndex = 7;
- //
- // txtRemarks
- //
- this.txtRemarks.Location = new System.Drawing.Point(232, 193);
- this.txtRemarks.Multiline = true;
- this.txtRemarks.Name = "txtRemarks";
- this.txtRemarks.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
- this.txtRemarks.Size = new System.Drawing.Size(173, 65);
- this.txtRemarks.TabIndex = 9;
- //
- // comboBox1
- //
- this.comboBox1.FormattingEnabled = true;
- this.comboBox1.Items.AddRange(new object[] {
- "所选巡检点"});
- this.comboBox1.Location = new System.Drawing.Point(232, 154);
- this.comboBox1.Name = "comboBox1";
- this.comboBox1.Size = new System.Drawing.Size(171, 20);
- this.comboBox1.TabIndex = 10;
- //
- // btnSave
- //
- this.btnSave.Location = new System.Drawing.Point(499, 235);
- this.btnSave.Name = "btnSave";
- this.btnSave.Size = new System.Drawing.Size(75, 23);
- this.btnSave.TabIndex = 11;
- this.btnSave.Text = "保存";
- this.btnSave.UseVisualStyleBackColor = true;
- //
- // listView1
- //
- this.listView1.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
- this.columnHeader1,
- this.columnHeader2,
- this.columnHeader3,
- this.columnHeader4,
- this.columnHeader5,
- this.columnHeader6});
- this.listView1.GridLines = true;
- this.listView1.Location = new System.Drawing.Point(27, 322);
- this.listView1.Name = "listView1";
- this.listView1.Size = new System.Drawing.Size(587, 175);
- this.listView1.TabIndex = 12;
- this.listView1.UseCompatibleStateImageBehavior = false;
- this.listView1.View = System.Windows.Forms.View.Details;
- //
- // columnHeader1
- //
- this.columnHeader1.Text = "编号";
- //
- // columnHeader2
- //
- this.columnHeader2.Text = "名称";
- //
- // columnHeader3
- //
- this.columnHeader3.Text = "别名";
- //
- // columnHeader4
- //
- this.columnHeader4.Text = "值类型";
- //
- // columnHeader5
- //
- this.columnHeader5.Text = "所属巡检点";
- //
- // columnHeader6
- //
- this.columnHeader6.Text = "备注";
- //
- // frmBuildItem
- //
- this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
- this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size(716, 586);
- this.Controls.Add(this.listView1);
- this.Controls.Add(this.btnSave);
- this.Controls.Add(this.comboBox1);
- this.Controls.Add(this.txtRemarks);
- this.Controls.Add(this.cboValue);
- this.Controls.Add(this.txtAlias);
- this.Controls.Add(this.lblRemarks);
- this.Controls.Add(this.lblPoints);
- this.Controls.Add(this.lblValue);
- this.Controls.Add(this.lblAlias);
- this.Controls.Add(this.txtName);
- this.Controls.Add(this.lblName);
- this.Name = "frmBuildItem";
- this.Text = "新建巡检项";
- this.ResumeLayout(false);
- this.PerformLayout();
-
- }
-
- #endregion
-
- private System.Windows.Forms.Label lblName;
- private System.Windows.Forms.TextBox txtName;
- private System.Windows.Forms.Label lblAlias;
- private System.Windows.Forms.Label lblValue;
- private System.Windows.Forms.Label lblPoints;
- private System.Windows.Forms.Label lblRemarks;
- private System.Windows.Forms.TextBox txtAlias;
- private System.Windows.Forms.ComboBox cboValue;
- private System.Windows.Forms.TextBox txtRemarks;
- private System.Windows.Forms.ComboBox comboBox1;
- private System.Windows.Forms.Button btnSave;
- private System.Windows.Forms.ListView listView1;
- private System.Windows.Forms.ColumnHeader columnHeader1;
- private System.Windows.Forms.ColumnHeader columnHeader2;
- private System.Windows.Forms.ColumnHeader columnHeader3;
- private System.Windows.Forms.ColumnHeader columnHeader4;
- private System.Windows.Forms.ColumnHeader columnHeader5;
- private System.Windows.Forms.ColumnHeader columnHeader6;
- }
+namespace WorkStation
+{
+ partial class frmAddItem
+ {
+ /// <summary>
+ /// Required designer variable.
+ /// </summary>
+ private System.ComponentModel.IContainer components = null;
+
+ /// <summary>
+ /// Clean up any resources being used.
+ /// </summary>
+ /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ /// <summary>
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ /// </summary>
+ private void InitializeComponent()
+ {
+ this.lblName = new System.Windows.Forms.Label();
+ this.txtName = new System.Windows.Forms.TextBox();
+ this.lblAlias = new System.Windows.Forms.Label();
+ this.lblValue = new System.Windows.Forms.Label();
+ this.lblPoints = new System.Windows.Forms.Label();
+ this.lblRemarks = new System.Windows.Forms.Label();
+ this.txtAlias = new System.Windows.Forms.TextBox();
+ this.cboValue = new System.Windows.Forms.ComboBox();
+ this.txtRemarks = new System.Windows.Forms.TextBox();
+ this.cboPoint = new System.Windows.Forms.ComboBox();
+ this.btnSave = new System.Windows.Forms.Button();
+ this.label1 = new System.Windows.Forms.Label();
+ this.cboMachine = new System.Windows.Forms.ComboBox();
+ this.btnUpdate = new System.Windows.Forms.Button();
+ this.btnDel = new System.Windows.Forms.Button();
+ this.dgvItems = new System.Windows.Forms.DataGridView();
+ this.chkColumn = new System.Windows.Forms.DataGridViewCheckBoxColumn();
+ this.labID = new System.Windows.Forms.Label();
+ ((System.ComponentModel.ISupportInitialize)(this.dgvItems)).BeginInit();
+ this.SuspendLayout();
+ //
+ // lblName
+ //
+ this.lblName.AutoSize = true;
+ this.lblName.Location = new System.Drawing.Point(30, 31);
+ this.lblName.Name = "lblName";
+ this.lblName.Size = new System.Drawing.Size(29, 12);
+ this.lblName.TabIndex = 0;
+ this.lblName.Text = "名称";
+ //
+ // txtName
+ //
+ this.txtName.Location = new System.Drawing.Point(101, 24);
+ this.txtName.Name = "txtName";
+ this.txtName.Size = new System.Drawing.Size(171, 21);
+ this.txtName.TabIndex = 1;
+ //
+ // lblAlias
+ //
+ this.lblAlias.AutoSize = true;
+ this.lblAlias.Location = new System.Drawing.Point(312, 31);
+ this.lblAlias.Name = "lblAlias";
+ this.lblAlias.Size = new System.Drawing.Size(29, 12);
+ this.lblAlias.TabIndex = 2;
+ this.lblAlias.Text = "别名";
+ //
+ // lblValue
+ //
+ this.lblValue.AutoSize = true;
+ this.lblValue.Location = new System.Drawing.Point(312, 79);
+ this.lblValue.Name = "lblValue";
+ this.lblValue.Size = new System.Drawing.Size(41, 12);
+ this.lblValue.TabIndex = 3;
+ this.lblValue.Text = "值类型";
+ //
+ // lblPoints
+ //
+ this.lblPoints.AutoSize = true;
+ this.lblPoints.Location = new System.Drawing.Point(12, 109);
+ this.lblPoints.Name = "lblPoints";
+ this.lblPoints.Size = new System.Drawing.Size(65, 12);
+ this.lblPoints.TabIndex = 4;
+ this.lblPoints.Text = "所属巡检点";
+ //
+ // lblRemarks
+ //
+ this.lblRemarks.AutoSize = true;
+ this.lblRemarks.Location = new System.Drawing.Point(30, 152);
+ this.lblRemarks.Name = "lblRemarks";
+ this.lblRemarks.Size = new System.Drawing.Size(29, 12);
+ this.lblRemarks.TabIndex = 5;
+ this.lblRemarks.Text = "备注";
+ //
+ // txtAlias
+ //
+ this.txtAlias.Location = new System.Drawing.Point(383, 24);
+ this.txtAlias.Name = "txtAlias";
+ this.txtAlias.Size = new System.Drawing.Size(171, 21);
+ this.txtAlias.TabIndex = 6;
+ //
+ // cboValue
+ //
+ this.cboValue.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+ this.cboValue.FormattingEnabled = true;
+ this.cboValue.Location = new System.Drawing.Point(383, 71);
+ this.cboValue.Name = "cboValue";
+ this.cboValue.Size = new System.Drawing.Size(171, 20);
+ this.cboValue.TabIndex = 7;
+ //
+ // txtRemarks
+ //
+ this.txtRemarks.Location = new System.Drawing.Point(101, 149);
+ this.txtRemarks.Multiline = true;
+ this.txtRemarks.Name = "txtRemarks";
+ this.txtRemarks.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
+ this.txtRemarks.Size = new System.Drawing.Size(475, 65);
+ this.txtRemarks.TabIndex = 9;
+ //
+ // cboPoint
+ //
+ this.cboPoint.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+ this.cboPoint.FormattingEnabled = true;
+ this.cboPoint.Items.AddRange(new object[] {
+ "所选巡检点"});
+ this.cboPoint.Location = new System.Drawing.Point(101, 109);
+ this.cboPoint.Name = "cboPoint";
+ this.cboPoint.Size = new System.Drawing.Size(171, 20);
+ this.cboPoint.TabIndex = 10;
+ //
+ // btnSave
+ //
+ this.btnSave.Location = new System.Drawing.Point(278, 234);
+ this.btnSave.Name = "btnSave";
+ this.btnSave.Size = new System.Drawing.Size(75, 23);
+ this.btnSave.TabIndex = 11;
+ this.btnSave.Text = "保存";
+ this.btnSave.UseVisualStyleBackColor = true;
+ this.btnSave.Click += new System.EventHandler(this.btnSave_Click);
+ //
+ // label1
+ //
+ this.label1.AutoSize = true;
+ this.label1.Location = new System.Drawing.Point(30, 71);
+ this.label1.Name = "label1";
+ this.label1.Size = new System.Drawing.Size(53, 12);
+ this.label1.TabIndex = 14;
+ this.label1.Text = "所属机器";
+ //
+ // cboMachine
+ //
+ this.cboMachine.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+ this.cboMachine.FormattingEnabled = true;
+ this.cboMachine.Location = new System.Drawing.Point(101, 68);
+ this.cboMachine.Name = "cboMachine";
+ this.cboMachine.Size = new System.Drawing.Size(171, 20);
+ this.cboMachine.TabIndex = 15;
+ //
+ // btnUpdate
+ //
+ this.btnUpdate.Location = new System.Drawing.Point(383, 234);
+ this.btnUpdate.Name = "btnUpdate";
+ this.btnUpdate.Size = new System.Drawing.Size(75, 23);
+ this.btnUpdate.TabIndex = 17;
+ this.btnUpdate.Text = "修改";
+ this.btnUpdate.UseVisualStyleBackColor = true;
+ this.btnUpdate.Click += new System.EventHandler(this.btnUpdate_Click);
+ //
+ // btnDel
+ //
+ this.btnDel.Location = new System.Drawing.Point(488, 234);
+ this.btnDel.Name = "btnDel";
+ this.btnDel.Size = new System.Drawing.Size(75, 23);
+ this.btnDel.TabIndex = 18;
+ this.btnDel.Text = "删除";
+ this.btnDel.UseVisualStyleBackColor = true;
+ this.btnDel.Click += new System.EventHandler(this.btnDel_Click);
+ //
+ // dgvItems
+ //
+ this.dgvItems.AllowUserToAddRows = false;
+ this.dgvItems.AllowUserToDeleteRows = false;
+ this.dgvItems.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+ this.dgvItems.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
+ this.chkColumn});
+ this.dgvItems.Location = new System.Drawing.Point(14, 318);
+ this.dgvItems.Name = "dgvItems";
+ this.dgvItems.ReadOnly = true;
+ this.dgvItems.RowTemplate.Height = 23;
+ this.dgvItems.Size = new System.Drawing.Size(659, 236);
+ this.dgvItems.TabIndex = 19;
+ this.dgvItems.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvItems_CellClick);
+ //
+ // chkColumn
+ //
+ this.chkColumn.HeaderText = "选择";
+ this.chkColumn.Name = "chkColumn";
+ this.chkColumn.ReadOnly = true;
+ this.chkColumn.Width = 38;
+ //
+ // labID
+ //
+ this.labID.AutoSize = true;
+ this.labID.Location = new System.Drawing.Point(383, 116);
+ this.labID.Name = "labID";
+ this.labID.Size = new System.Drawing.Size(53, 12);
+ this.labID.TabIndex = 20;
+ this.labID.Text = "巡检项ID";
+ this.labID.Visible = false;
+ //
+ // frmAddItem
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(716, 586);
+ this.Controls.Add(this.labID);
+ this.Controls.Add(this.dgvItems);
+ this.Controls.Add(this.btnDel);
+ this.Controls.Add(this.btnUpdate);
+ this.Controls.Add(this.cboMachine);
+ this.Controls.Add(this.label1);
+ this.Controls.Add(this.btnSave);
+ this.Controls.Add(this.cboPoint);
+ this.Controls.Add(this.txtRemarks);
+ this.Controls.Add(this.cboValue);
+ this.Controls.Add(this.txtAlias);
+ this.Controls.Add(this.lblRemarks);
+ this.Controls.Add(this.lblPoints);
+ this.Controls.Add(this.lblValue);
+ this.Controls.Add(this.lblAlias);
+ this.Controls.Add(this.txtName);
+ this.Controls.Add(this.lblName);
+ this.Name = "frmAddItem";
+ this.Text = "新建巡检项";
+ this.Load += new System.EventHandler(this.frmAddItem_Load);
+ ((System.ComponentModel.ISupportInitialize)(this.dgvItems)).EndInit();
+ this.ResumeLayout(false);
+ this.PerformLayout();
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.Label lblName;
+ private System.Windows.Forms.TextBox txtName;
+ private System.Windows.Forms.Label lblAlias;
+ private System.Windows.Forms.Label lblValue;
+ private System.Windows.Forms.Label lblPoints;
+ private System.Windows.Forms.Label lblRemarks;
+ private System.Windows.Forms.TextBox txtAlias;
+ private System.Windows.Forms.ComboBox cboValue;
+ private System.Windows.Forms.TextBox txtRemarks;
+ private System.Windows.Forms.ComboBox cboPoint;
+ private System.Windows.Forms.Button btnSave;
+ private System.Windows.Forms.Label label1;
+ private System.Windows.Forms.ComboBox cboMachine;
+ private System.Windows.Forms.Button btnUpdate;
+ private System.Windows.Forms.Button btnDel;
+ private System.Windows.Forms.DataGridView dgvItems;
+ private System.Windows.Forms.DataGridViewCheckBoxColumn chkColumn;
+ private System.Windows.Forms.Label labID;
+ }
}
View
187 Application/frmAddItem.cs
@@ -6,6 +6,7 @@
using System.Linq;
using System.Text;
using System.Windows.Forms;
+using System.Data.SqlClient;
namespace WorkStation
{
@@ -16,9 +17,193 @@ public frmAddItem()
InitializeComponent();
}
- private void txtPoint_TextChanged(object sender, EventArgs e)
+ private void frmAddItem_Load(object sender, EventArgs e)
+ {
+ this.labID.Text = "";
+ getMachine();
+ getValueType();
+ getPoint();
+ bindDgvItems();
+ }
+
+ private void btnSave_Click(object sender, EventArgs e)
{
+ if (cboMachine.SelectedValue.ToString() == "")
+ {
+ MessageBox.Show("请选择所属机器");
+ return;
+ }
+ if (cboPoint.SelectedValue==null)
+ {
+ MessageBox.Show("请选择所属地点");
+ return;
+ }
+ //if(SqlHelper.ExecuteNonQuery("Select 1 From CheckItem Where "))
+ string str_insert = "Insert into CheckItem([Name],Alias,Machine_ID,ValueType,Phy_ID,Comment) Values(@name,@alias,@machineid,@valuetype,@pointid,@comment)";
+ SqlParameter[] pars = new SqlParameter[]{
+ new SqlParameter("@name",SqlDbType.NVarChar),
+ new SqlParameter("@alias",SqlDbType.NVarChar),
+ new SqlParameter("@machineid",SqlDbType.Int),
+ new SqlParameter("@valuetype",SqlDbType.Int),
+ new SqlParameter("@pointid",SqlDbType.Int),
+ new SqlParameter("@comment",SqlDbType.NText)
+ };
+ pars[0].Value = this.txtName.Text.ToString().Trim();
+ pars[1].Value = this.txtAlias.Text.ToString().Trim();
+ pars[2].Value = this.cboMachine.SelectedValue;
+ pars[3].Value = ((BoxItem)this.cboValue.SelectedItem).Value;
+ pars[4].Value = this.cboPoint.SelectedValue;
+ pars[5].Value = this.txtRemarks.Text;
+
+ int _ret = SqlHelper.ExecuteNonQuery(str_insert,pars);
+ if (_ret == 1)
+ {
+ MessageBox.Show("保存成功");
+ }
+ bindDgvItems();
+ }
+
+ private void getMachine()
+ {
+ DataSet ds= SqlHelper.ExecuteDataset("select ID,Name From Machine");
+ this.cboMachine.DataSource=ds.Tables[0];
+ this.cboMachine.DisplayMember = "Name";
+ this.cboMachine.ValueMember = "ID";
+ this.cboMachine.SelectedIndex = cboMachine.Items.Count>0?0:-1;
+ }
+ private void getValueType()
+ {
+ BoxItem bi1 = new BoxItem();
+ bi1.Text = "正常/不正常";
+ bi1.Value = "0";
+ this.cboValue.Items.Add(bi1);
+ BoxItem bi2 = new BoxItem();
+ bi2.Text = "数值";
+ bi2.Value = "1";
+ this.cboValue.Items.Add(bi2);
+ this.cboValue.SelectedIndex = cboMachine.Items.Count > 0 ? 0 : -1;
+ }
+ private void getPoint()
+ {
+ DataSet ds = SqlHelper.ExecuteDataset("select ID,Name From PhysicalCheckPoint");
+ this.cboPoint.DataSource=ds.Tables[0];
+ this.cboPoint.DisplayMember = "Name";
+ this.cboPoint.ValueMember = "ID";
+ this.cboPoint.SelectedIndex = cboPoint.Items.Count > 0 ? 0 : -1;
+ }
+
+ private void bindDgvItems()
+ {
+ string str_select = @"select
+ c.ID as 编号,
+ c.name as 名称,
+ c.alias as 别名,
+ (case c.ValueType when 0 then '正常/不正常' when 1 then '数值' end) as 值类型,
+ m.name as 所属机器,
+ p.name as 所属巡检点,
+ c.comment as 备注
+ from checkitem c,Machine m,PhysicalCheckPoint p
+ where c.machine_id=m.id and c.Phy_ID=p.id ";
+ DataSet ds = SqlHelper.ExecuteDataset(str_select);
+ dgvItems.DataSource=ds.Tables[0];
+ }
+
+ private void dgvItems_CellClick(object sender, DataGridViewCellEventArgs e)
+ {
+ if (e.RowIndex == -1) return;
+ if (e.ColumnIndex == 0)
+ {
+ if ((bool)dgvItems.Rows[e.RowIndex].Cells[0].EditedFormattedValue == false)
+ {
+ dgvItems.Rows[e.RowIndex].Cells[0].Value = true;
+ }
+ else
+ {
+ dgvItems.Rows[e.RowIndex].Cells[0].Value = false;
+ }
+ }
+ else
+ {
+ labID.Text = dgvItems.Rows[e.RowIndex].Cells[1].Value.ToString();
+ txtName.Text = dgvItems.Rows[e.RowIndex].Cells[2].Value.ToString();
+ txtAlias.Text = dgvItems.Rows[e.RowIndex].Cells[3].Value.ToString();
+ cboValue.Text = dgvItems.Rows[e.RowIndex].Cells[4].Value.ToString();
+ cboMachine.Text = dgvItems.Rows[e.RowIndex].Cells[5].Value.ToString();
+ cboPoint.Text = dgvItems.Rows[e.RowIndex].Cells[6].Value.ToString();
+ txtRemarks.Text = dgvItems.Rows[e.RowIndex].Cells[7].Value.ToString();
+ }
+ }
+
+ private void btnUpdate_Click(object sender, EventArgs e)
+ {
+ if (labID.Text == "")
+ {
+ return;
+ }
+ if (cboMachine.SelectedValue.ToString() == "")
+ {
+ MessageBox.Show("请选择所属机器");
+ return;
+ }
+ if (cboPoint.SelectedValue.ToString() == "")
+ {
+ MessageBox.Show("请选择所属地点");
+ return;
+ }
+
+ string str_insert = "Update CheckItem set [Name]=@name,Alias=@alias,Machine_ID=@machineid,ValueType=@valuetype,Phy_ID=@phyid,Comment=@comment where ID=" + labID.Text.Trim();
+ SqlParameter[] pars = new SqlParameter[]{
+ new SqlParameter("@name",SqlDbType.NVarChar),
+ new SqlParameter("@alias",SqlDbType.NVarChar),
+ new SqlParameter("@machineid",SqlDbType.Int),
+ new SqlParameter("@valuetype",SqlDbType.Int),
+ new SqlParameter("@phyid",SqlDbType.Int),
+ new SqlParameter("@comment",SqlDbType.NText)
+ };
+ pars[0].Value = this.txtName.Text.ToString().Trim();
+ pars[1].Value = this.txtAlias.Text.ToString().Trim();
+ pars[2].Value = this.cboMachine.SelectedValue;
+ pars[3].Value = ((BoxItem)this.cboValue.SelectedItem).Value;
+ pars[4].Value = this.cboPoint.SelectedValue;
+ pars[5].Value = this.txtRemarks.Text;
+
+ int _ret = SqlHelper.ExecuteNonQuery(str_insert, pars);
+ if (_ret == 1)
+ {
+ MessageBox.Show("保存成功");
+ }
+ bindDgvItems();
+ }
+ private void btnDel_Click(object sender, EventArgs e)
+ {
+ string Del = "";
+ string strsql = "Delete From CheckItem Where ID in(";
+ for (int i = 0; i < dgvItems.Rows.Count; i++)
+ {
+ try
+ {
+ if ((bool)dgvItems.Rows[i].Cells[0].Value == true)
+ {
+ Del += dgvItems.Rows[i].Cells[1].Value.ToString() + ",";
+ }
+ }
+ catch
+ {
+ continue;
+ }
+ }
+ if (Del != "")
+ {
+ Del = Del.Substring(0, Del.Length - 1);
+ strsql += Del + ")";
+ SqlHelper.ExecuteNonQuery(strsql);
+ bindDgvItems();
+ }
+ else
+ {
+ MessageBox.Show("请选择要删除的项");
+ }
}
}
}
View
232 Application/frmAddItem.cs.orig
@@ -0,0 +1,232 @@
+<<<<<<< HEAD
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+
+namespace WorkStation
+{
+ public partial class frmAddItem : Form
+ {
+ public frmAddItem()
+ {
+ InitializeComponent();
+ }
+
+ }
+}
+=======
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+using System.Data.SqlClient;
+
+namespace WorkStation
+{
+ public partial class frmAddItem : Form
+ {
+ public frmAddItem()
+ {
+ InitializeComponent();
+ }
+
+ private void frmAddItem_Load(object sender, EventArgs e)
+ {
+ this.labID.Text = "";
+ getMachine();
+ getValueType();
+ getPoint();
+ bindDgvItems();
+ }
+
+ private void btnSave_Click(object sender, EventArgs e)
+ {
+
+ if (cboMachine.SelectedValue.ToString() == "")
+ {
+ MessageBox.Show("请选择所属机器");
+ return;
+ }
+ if (cboPoint.SelectedValue==null)
+ {
+ MessageBox.Show("请选择所属地点");
+ return;
+ }
+ //if(SqlHelper.ExecuteNonQuery("Select 1 From CheckItem Where "))
+ string str_insert = "Insert into CheckItem([Name],Alias,Machine_ID,ValueType,Phy_ID,Comment) Values(@name,@alias,@machineid,@valuetype,@pointid,@comment)";
+ SqlParameter[] pars = new SqlParameter[]{
+ new SqlParameter("@name",SqlDbType.NVarChar),
+ new SqlParameter("@alias",SqlDbType.NVarChar),
+ new SqlParameter("@machineid",SqlDbType.Int),
+ new SqlParameter("@valuetype",SqlDbType.Int),
+ new SqlParameter("@pointid",SqlDbType.Int),
+ new SqlParameter("@comment",SqlDbType.NText)
+ };
+ pars[0].Value = this.txtName.Text.ToString().Trim();
+ pars[1].Value = this.txtAlias.Text.ToString().Trim();
+ pars[2].Value = this.cboMachine.SelectedValue;
+ pars[3].Value = ((BoxItem)this.cboValue.SelectedItem).Value;
+ pars[4].Value = this.cboPoint.SelectedValue;
+ pars[5].Value = this.txtRemarks.Text;
+
+ int _ret = SqlHelper.ExecuteNonQuery(str_insert,pars);
+ if (_ret == 1)
+ {
+ MessageBox.Show("保存成功");
+ }
+ bindDgvItems();
+ }
+
+ private void getMachine()
+ {
+ DataSet ds= SqlHelper.ExecuteDataset("select ID,Name From Machine");
+ this.cboMachine.DataSource=ds.Tables[0];
+ this.cboMachine.DisplayMember = "Name";
+ this.cboMachine.ValueMember = "ID";
+ this.cboMachine.SelectedIndex = cboMachine.Items.Count>0?0:-1;
+ }
+ private void getValueType()
+ {
+ BoxItem bi1 = new BoxItem();
+ bi1.Text = "正常/不正常";
+ bi1.Value = "0";
+ this.cboValue.Items.Add(bi1);
+ BoxItem bi2 = new BoxItem();
+ bi2.Text = "数值";
+ bi2.Value = "1";
+ this.cboValue.Items.Add(bi2);
+ this.cboValue.SelectedIndex = cboMachine.Items.Count > 0 ? 0 : -1;
+ }
+ private void getPoint()
+ {
+ DataSet ds = SqlHelper.ExecuteDataset("select ID,Name From PhysicalCheckPoint");
+ this.cboPoint.DataSource=ds.Tables[0];
+ this.cboPoint.DisplayMember = "Name";
+ this.cboPoint.ValueMember = "ID";
+ this.cboPoint.SelectedIndex = cboPoint.Items.Count > 0 ? 0 : -1;
+ }
+
+ private void bindDgvItems()
+ {
+ string str_select = @"select
+ c.ID as 编号,
+ c.name as 名称,
+ c.alias as 别名,
+ (case c.ValueType when 0 then '正常/不正常' when 1 then '数值' end) as 值类型,
+ m.name as 所属机器,
+ p.name as 所属巡检点,
+ c.comment as 备注
+ from checkitem c,Machine m,PhysicalCheckPoint p
+ where c.machine_id=m.id and c.Phy_ID=p.id ";
+ DataSet ds = SqlHelper.ExecuteDataset(str_select);
+ dgvItems.DataSource=ds.Tables[0];
+ }
+
+ private void dgvItems_CellClick(object sender, DataGridViewCellEventArgs e)
+ {
+ if (e.RowIndex == -1) return;
+ if (e.ColumnIndex == 0)
+ {
+ if ((bool)dgvItems.Rows[e.RowIndex].Cells[0].EditedFormattedValue == false)
+ {
+ dgvItems.Rows[e.RowIndex].Cells[0].Value = true;
+ }
+ else
+ {
+ dgvItems.Rows[e.RowIndex].Cells[0].Value = false;
+ }
+ }
+ else
+ {
+ labID.Text = dgvItems.Rows[e.RowIndex].Cells[1].Value.ToString();
+ txtName.Text = dgvItems.Rows[e.RowIndex].Cells[2].Value.ToString();
+ txtAlias.Text = dgvItems.Rows[e.RowIndex].Cells[3].Value.ToString();
+ cboValue.Text = dgvItems.Rows[e.RowIndex].Cells[4].Value.ToString();
+ cboMachine.Text = dgvItems.Rows[e.RowIndex].Cells[5].Value.ToString();
+ cboPoint.Text = dgvItems.Rows[e.RowIndex].Cells[6].Value.ToString();
+ txtRemarks.Text = dgvItems.Rows[e.RowIndex].Cells[7].Value.ToString();
+ }
+ }
+
+ private void btnUpdate_Click(object sender, EventArgs e)
+ {
+ if (labID.Text == "")
+ {
+ return;
+ }
+ if (cboMachine.SelectedValue.ToString() == "")
+ {
+ MessageBox.Show("请选择所属机器");
+ return;
+ }
+ if (cboPoint.SelectedValue.ToString() == "")
+ {
+ MessageBox.Show("请选择所属地点");
+ return;
+ }
+
+ string str_insert = "Update CheckItem set [Name]=@name,Alias=@alias,Machine_ID=@machineid,ValueType=@valuetype,Phy_ID=@phyid,Comment=@comment where ID=" + labID.Text.Trim();
+ SqlParameter[] pars = new SqlParameter[]{
+ new SqlParameter("@name",SqlDbType.NVarChar),
+ new SqlParameter("@alias",SqlDbType.NVarChar),