C#下每一个操作都是存储过程啊……
//
// sqlDataAdapter1
//
this.sqlDataAdapter1.DeleteCommand = this.sqlDeleteCommand1;
this.sqlDataAdapter1.InsertCommand = this.sqlInsertCommand1;
this.sqlDataAdapter1.SelectCommand = this.sqlSelectCommand1;
this.sqlDataAdapter1.TableMappings.AddRange(new System.Data.Common.DataTableMapping[] {
new System.Data.Common.DataTableMapping("Table", "ProductInfo", new System.Data.Common.DataColumnMapping[] {
new System.Data.Common.DataColumnMapping("id", "id"),
new System.Data.Common.DataColumnMapping("ProductID", "ProductID"),
new System.Data.Common.DataColumnMapping("PYear", "PYear"),
new System.Data.Common.DataColumnMapping("PName", "PName"),
new System.Data.Common.DataColumnMapping("PSize", "PSize"),
new System.Data.Common.DataColumnMapping("PCaiZhi", "PCaiZhi"),
new System.Data.Common.DataColumnMapping("PPeijian", "PPeijian"),
new System.Data.Common.DataColumnMapping("PTeSe", "PTeSe")})});
this.sqlDataAdapter1.UpdateCommand = this.sqlUpdateCommand1;
//
// sqlDeleteCommand1
//
this.sqlDeleteCommand1.CommandText = @"DELETE FROM ProductInfo WHERE (id = @Original_id) AND (PCaiZhi = @Original_PCaiZhi OR @Original_PCaiZhi IS NULL AND PCaiZhi IS NULL) AND (PName = @Original_PName OR @Original_PName IS NULL AND PName IS NULL) AND (PPeijian = @Original_PPeijian OR @Original_PPeijian IS NULL AND PPeijian IS NULL) AND (PSize = @Original_PSize OR @Original_PSize IS NULL AND PSize IS NULL) AND (PTeSe = @Original_PTeSe OR @Original_PTeSe IS NULL AND PTeSe IS NULL) AND (PYear = @Original_PYear OR @Original_PYear IS NULL AND PYear IS NULL) AND (ProductID = @Original_ProductID OR @Original_ProductID IS NULL AND ProductID IS NULL)";
this.sqlDeleteCommand1.Connection = this.sqlConnection1;
this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_id", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "id", System.Data.DataRowVersion.Original, null));
this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_PCaiZhi", System.Data.SqlDbType.VarChar, 50, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "PCaiZhi", System.Data.DataRowVersion.Original, null));
this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_PName", System.Data.SqlDbType.VarChar, 50, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "PName", System.Data.DataRowVersion.Original, null));
this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_PPeijian", System.Data.SqlDbType.VarChar, 50, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "PPeijian", System.Data.DataRowVersion.Original, null));
this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_PSize", System.Data.SqlDbType.VarChar, 50, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "PSize", System.Data.DataRowVersion.Original, null));
this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_PTeSe", System.Data.SqlDbType.VarChar, 50, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "PTeSe", System.Data.DataRowVersion.Original, null));
this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_PYear", System.Data.SqlDbType.VarChar, 50, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "PYear", System.Data.DataRowVersion.Original, null));
this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ProductID", System.Data.SqlDbType.VarChar, 50, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "ProductID", System.Data.DataRowVersion.Original, null));
//
// sqlInsertCommand1
//
this.sqlInsertCommand1.CommandText = @"INSERT INTO ProductInfo(ProductID, PYear, PName, PSize, PCaiZhi, PPeijian, PTeSe) VALUES (@ProductID, @PYear, @PName, @PSize, @PCaiZhi, @PPeijian, @PTeSe);
SELECT id, ProductID, PYear, PName, PSize, PCaiZhi, PPeijian, PTeSe FROM ProductInfo WHERE (id = @@IDENTITY)";
this.sqlInsertCommand1.Connection = this.sqlConnection1;
this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ProductID", System.Data.SqlDbType.VarChar, 50, "ProductID"));
this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@PYear", System.Data.SqlDbType.VarChar, 50, "PYear"));
this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@PName", System.Data.SqlDbType.VarChar, 50, "PName"));
this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@PSize", System.Data.SqlDbType.VarChar, 50, "PSize"));
this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@PCaiZhi", System.Data.SqlDbType.VarChar, 50, "PCaiZhi"));
this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@PPeijian", System.Data.SqlDbType.VarChar, 50, "PPeijian"));
this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@PTeSe", System.Data.SqlDbType.VarChar, 50, "PTeSe"));
//
// sqlSelectCommand1
//
this.sqlSelectCommand1.CommandText = "SELECT id, ProductID, PYear, PName, PSize, PCaiZhi, PPeijian, PTeSe FROM ProductI" +
"nfo";
this.sqlSelectCommand1.Connection = this.sqlConnection1;
//
// sqlUpdateCommand1
//
this.sqlUpdateCommand1.CommandText = @"UPDATE ProductInfo SET ProductID = @ProductID, PYear = @PYear, PName = @PName, PSize = @PSize, PCaiZhi = @PCaiZhi, PPeijian = @PPeijian, PTeSe = @PTeSe WHERE (id = @Original_id) AND (PCaiZhi = @Original_PCaiZhi OR @Original_PCaiZhi IS NULL AND PCaiZhi IS NULL) AND (PName = @Original_PName OR @Original_PName IS NULL AND PName IS NULL) AND (PPeijian = @Original_PPeijian OR @Original_PPeijian IS NULL AND PPeijian IS NULL) AND (PSize = @Original_PSize OR @Original_PSize IS NULL AND PSize IS NULL) AND (PTeSe = @Original_PTeSe OR @Original_PTeSe IS NULL AND PTeSe IS NULL) AND (PYear = @Original_PYear OR @Original_PYear IS NULL AND PYear IS NULL) AND (ProductID = @Original_ProductID OR @Original_ProductID IS NULL AND ProductID IS NULL);
SELECT id, ProductID, PYear, PName, PSize, PCaiZhi, PPeijian, PTeSe FROM ProductInfo WHERE (id = @id)";
this.sqlUpdateCommand1.Connection = this.sqlConnection1;
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ProductID", System.Data.SqlDbType.VarChar, 50, "ProductID"));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@PYear", System.Data.SqlDbType.VarChar, 50, "PYear"));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@PName", System.Data.SqlDbType.VarChar, 50, "PName"));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@PSize", System.Data.SqlDbType.VarChar, 50, "PSize"));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@PCaiZhi", System.Data.SqlDbType.VarChar, 50, "PCaiZhi"));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@PPeijian", System.Data.SqlDbType.VarChar, 50, "PPeijian"));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@PTeSe", System.Data.SqlDbType.VarChar, 50, "PTeSe"));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_id", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "id", System.Data.DataRowVersion.Original, null));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_PCaiZhi", System.Data.SqlDbType.VarChar, 50, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "PCaiZhi", System.Data.DataRowVersion.Original, null));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_PName", System.Data.SqlDbType.VarChar, 50, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "PName", System.Data.DataRowVersion.Original, null));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_PPeijian", System.Data.SqlDbType.VarChar, 50, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "PPeijian", System.Data.DataRowVersion.Original, null));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_PSize", System.Data.SqlDbType.VarChar, 50, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "PSize", System.Data.DataRowVersion.Original, null));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_PTeSe", System.Data.SqlDbType.VarChar, 50, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "PTeSe", System.Data.DataRowVersion.Original, null));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_PYear", System.Data.SqlDbType.VarChar, 50, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "PYear", System.Data.DataRowVersion.Original, null));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ProductID", System.Data.SqlDbType.VarChar, 50, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "ProductID", System.Data.DataRowVersion.Original, null));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@id", System.Data.SqlDbType.Int, 4, "id"));