📄 jobdetails.cs
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
namespace WindowsApplication3
{
/// <summary>
/// JobDetails 的摘要说明。
/// </summary>
public class JobDetails : System.Windows.Forms.Form
{
private System.Data.OleDb.OleDbCommand oleDbSelectCommand1;
private System.Data.OleDb.OleDbCommand oleDbInsertCommand1;
private System.Data.OleDb.OleDbCommand oleDbUpdateCommand1;
private System.Data.OleDb.OleDbCommand oleDbDeleteCommand1;
private System.Data.OleDb.OleDbConnection oleDbConnection1;
private System.Data.OleDb.OleDbDataAdapter oleDbDataAdapter1;
private WindowsApplication3.JobDatSet objJobDatSet;
private System.Windows.Forms.Button btnLoad;
private System.Windows.Forms.Button btnUpdate;
private System.Windows.Forms.Button btnCancelAll;
private System.Windows.Forms.Label lblCarNo;
private System.Windows.Forms.Label lblJobDate;
private System.Windows.Forms.Label lblWorkerID;
private System.Windows.Forms.Label lblKMs;
private System.Windows.Forms.Label lblTuning;
private System.Windows.Forms.Label lblAlignment;
private System.Windows.Forms.Label lblBalancing;
private System.Windows.Forms.Label lblTires;
private System.Windows.Forms.Label lblWeights;
private System.Windows.Forms.Label lblOilChanged;
private System.Windows.Forms.Label lblOilQty;
private System.Windows.Forms.TextBox editCarNo;
private System.Windows.Forms.TextBox editJobDate;
private System.Windows.Forms.TextBox editWorkerID;
private System.Windows.Forms.TextBox editKMs;
private System.Windows.Forms.TextBox editTuning;
private System.Windows.Forms.TextBox editAlignment;
private System.Windows.Forms.TextBox editBalancing;
private System.Windows.Forms.TextBox editTires;
private System.Windows.Forms.TextBox editWeights;
private System.Windows.Forms.TextBox editOilChanged;
private System.Windows.Forms.TextBox editOilQty;
private System.Windows.Forms.Label lblOilFilter;
private System.Windows.Forms.Label lblGearOil;
private System.Windows.Forms.Label lblGearOilQty;
private System.Windows.Forms.Label lblPoint;
private System.Windows.Forms.Label lblCondenser;
private System.Windows.Forms.Label lblPlug;
private System.Windows.Forms.Label lblPlugQty;
private System.Windows.Forms.Label lblFuelFilter;
private System.Windows.Forms.Label lblAirFilter;
private System.Windows.Forms.Label lblRemarks;
private System.Windows.Forms.TextBox editOilFilter;
private System.Windows.Forms.TextBox editGearOil;
private System.Windows.Forms.TextBox editGearOilQty;
private System.Windows.Forms.TextBox editPoint;
private System.Windows.Forms.TextBox editCondenser;
private System.Windows.Forms.TextBox editPlug;
private System.Windows.Forms.TextBox editPlugQty;
private System.Windows.Forms.TextBox editFuelFilter;
private System.Windows.Forms.TextBox editAirFilter;
private System.Windows.Forms.TextBox editRemarks;
private System.Windows.Forms.Button btnNavFirst;
private System.Windows.Forms.Button btnNavPrev;
private System.Windows.Forms.Label lblNavLocation;
private System.Windows.Forms.Button btnNavNext;
private System.Windows.Forms.Button btnLast;
private System.Windows.Forms.Button btnAdd;
private System.Windows.Forms.Button btnDelete;
private System.Windows.Forms.Button btnCancel;
private System.Windows.Forms.Button btnExit;
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.Container components = null;
public JobDetails()
{
//
// Windows 窗体设计器支持所必需的
//
InitializeComponent();
//
// TODO: 在 InitializeComponent 调用后添加任何构造函数代码
//
}
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows 窗体设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
/// 此方法的内容。
/// </summary>
private void InitializeComponent()
{
System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(JobDetails));
this.oleDbSelectCommand1 = new System.Data.OleDb.OleDbCommand();
this.oleDbConnection1 = new System.Data.OleDb.OleDbConnection();
this.oleDbInsertCommand1 = new System.Data.OleDb.OleDbCommand();
this.oleDbUpdateCommand1 = new System.Data.OleDb.OleDbCommand();
this.oleDbDeleteCommand1 = new System.Data.OleDb.OleDbCommand();
this.oleDbDataAdapter1 = new System.Data.OleDb.OleDbDataAdapter();
this.objJobDatSet = new WindowsApplication3.JobDatSet();
this.btnLoad = new System.Windows.Forms.Button();
this.btnUpdate = new System.Windows.Forms.Button();
this.btnCancelAll = new System.Windows.Forms.Button();
this.lblCarNo = new System.Windows.Forms.Label();
this.lblJobDate = new System.Windows.Forms.Label();
this.lblWorkerID = new System.Windows.Forms.Label();
this.lblKMs = new System.Windows.Forms.Label();
this.lblTuning = new System.Windows.Forms.Label();
this.lblAlignment = new System.Windows.Forms.Label();
this.lblBalancing = new System.Windows.Forms.Label();
this.lblTires = new System.Windows.Forms.Label();
this.lblWeights = new System.Windows.Forms.Label();
this.lblOilChanged = new System.Windows.Forms.Label();
this.lblOilQty = new System.Windows.Forms.Label();
this.editCarNo = new System.Windows.Forms.TextBox();
this.editJobDate = new System.Windows.Forms.TextBox();
this.editWorkerID = new System.Windows.Forms.TextBox();
this.editKMs = new System.Windows.Forms.TextBox();
this.editTuning = new System.Windows.Forms.TextBox();
this.editAlignment = new System.Windows.Forms.TextBox();
this.editBalancing = new System.Windows.Forms.TextBox();
this.editTires = new System.Windows.Forms.TextBox();
this.editWeights = new System.Windows.Forms.TextBox();
this.editOilChanged = new System.Windows.Forms.TextBox();
this.editOilQty = new System.Windows.Forms.TextBox();
this.lblOilFilter = new System.Windows.Forms.Label();
this.lblGearOil = new System.Windows.Forms.Label();
this.lblGearOilQty = new System.Windows.Forms.Label();
this.lblPoint = new System.Windows.Forms.Label();
this.lblCondenser = new System.Windows.Forms.Label();
this.lblPlug = new System.Windows.Forms.Label();
this.lblPlugQty = new System.Windows.Forms.Label();
this.lblFuelFilter = new System.Windows.Forms.Label();
this.lblAirFilter = new System.Windows.Forms.Label();
this.lblRemarks = new System.Windows.Forms.Label();
this.editOilFilter = new System.Windows.Forms.TextBox();
this.editGearOil = new System.Windows.Forms.TextBox();
this.editGearOilQty = new System.Windows.Forms.TextBox();
this.editPoint = new System.Windows.Forms.TextBox();
this.editCondenser = new System.Windows.Forms.TextBox();
this.editPlug = new System.Windows.Forms.TextBox();
this.editPlugQty = new System.Windows.Forms.TextBox();
this.editFuelFilter = new System.Windows.Forms.TextBox();
this.editAirFilter = new System.Windows.Forms.TextBox();
this.editRemarks = new System.Windows.Forms.TextBox();
this.btnNavFirst = new System.Windows.Forms.Button();
this.btnNavPrev = new System.Windows.Forms.Button();
this.lblNavLocation = new System.Windows.Forms.Label();
this.btnNavNext = new System.Windows.Forms.Button();
this.btnLast = new System.Windows.Forms.Button();
this.btnAdd = new System.Windows.Forms.Button();
this.btnDelete = new System.Windows.Forms.Button();
this.btnCancel = new System.Windows.Forms.Button();
this.btnExit = new System.Windows.Forms.Button();
((System.ComponentModel.ISupportInitialize)(this.objJobDatSet)).BeginInit();
this.SuspendLayout();
//
// oleDbSelectCommand1
//
this.oleDbSelectCommand1.CommandText = "SELECT CarNo, JobDate, WorkerID, KMs, Tuning, Alignment, Balancing, Tires, Weight" +
"s, OilChanged, OilQty, OilFilter, GearOil, GearOilQty, Point, Condenser, Plug, P" +
"lugQty, FuelFilter, AirFilter, Remarks FROM tblJobDetails";
this.oleDbSelectCommand1.Connection = this.oleDbConnection1;
//
// oleDbConnection1
//
this.oleDbConnection1.ConnectionString = @"Integrated Security=SSPI;Packet Size=4096;Data Source=25918CBF7A5641A;Tag with column collation when possible=False;Initial Catalog=CMS;Use Procedure for Prepare=1;Auto Translate=True;Persist Security Info=False;Provider=""SQLOLEDB.1"";Workstation ID=25918CBF7A5641A;Use Encryption for Data=False";
//
// oleDbInsertCommand1
//
this.oleDbInsertCommand1.CommandText = @"INSERT INTO tblJobDetails(CarNo, JobDate, WorkerID, KMs, Tuning, Alignment, Balancing, Tires, Weights, OilChanged, OilQty, OilFilter, GearOil, GearOilQty, Point, Condenser, Plug, PlugQty, FuelFilter, AirFilter, Remarks) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); SELECT CarNo, JobDate, WorkerID, KMs, Tuning, Alignment, Balancing, Tires, Weights, OilChanged, OilQty, OilFilter, GearOil, GearOilQty, Point, Condenser, Plug, PlugQty, FuelFilter, AirFilter, Remarks FROM tblJobDetails WHERE (CarNo = ?) AND (JobDate = ?)";
this.oleDbInsertCommand1.Connection = this.oleDbConnection1;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -