SqlParameter parameterFreightStyle = new SqlParameter("@FreightStyle", SqlDbType.Char ,12 );
parameterFreightStyle.Value = FreightStyle;
myCommand.Parameters.Add(parameterFreightStyle);
SqlParameter parameterMailing = new SqlParameter("@Mailing", SqlDbType.Int );
parameterMailing.Value = Mailing;
myCommand.Parameters.Add(parameterMailing);
SqlParameter parameterExpress = new SqlParameter("@Express", SqlDbType.Int );
parameterExpress.Value = Express;
myCommand.Parameters.Add(parameterExpress);
SqlParameter parameterPayStyle = new SqlParameter("@PayStyle", SqlDbType.Char ,15);
parameterPayStyle.Value = PayStyle;
myCommand.Parameters.Add(parameterPayStyle);
SqlParameter parameterGuarantee = new SqlParameter("@Guarantee", SqlDbType.Char ,4);
parameterGuarantee.Value = Guarantee;
myCommand.Parameters.Add(parameterGuarantee);
SqlParameter parameterInvoice = new SqlParameter("@Invoice", SqlDbType.Char ,4);
parameterInvoice.Value = Invoice;
myCommand.Parameters.Add(parameterInvoice);
SqlParameter parameterProvince = new SqlParameter("@Province", SqlDbType.Char ,10);
parameterProvince.Value = Province ;
myCommand.Parameters.Add(parameterProvince);
SqlParameter parameterCity = new SqlParameter("@City", SqlDbType.Char ,10);
parameterCity.Value = City;
myCommand.Parameters.Add(parameterCity);
SqlParameter parameterAmount = new SqlParameter("@Amount", SqlDbType.Int );
parameterAmount.Value = Amount;
myCommand.Parameters.Add(parameterAmount);
SqlParameter parameterBrowseTimes = new SqlParameter("@BrowseTimes", SqlDbType.Int );
parameterBrowseTimes.Value = 0;
myCommand.Parameters.Add(parameterBrowseTimes);
SqlParameter parameterNewGrade = new SqlParameter("@NewGrade", SqlDbType.Char ,6);
parameterNewGrade.Value = NewGrade;
myCommand.Parameters.Add(parameterNewGrade);
SqlParameter parameterComment = new SqlParameter("@Comment", SqlDbType.Char ,2);
parameterComment.Value = "No" ; //不推荐
myCommand.Parameters.Add(parameterComment);
SqlParameter parameterShelf = new SqlParameter("@Shelf", SqlDbType.Char ,2);
parameterShelf.Value = Shelf;
myCommand.Parameters.Add(parameterShelf);
SqlParameter parameterRate = new SqlParameter("@Rate", SqlDbType.Int );
parameterRate.Value = 0;
myCommand.Parameters.Add(parameterRate);
myConnection.Open();
myCommand.ExecuteNonQuery();
myConnection.Close();
}
/*删除商品*/
public void Delete(int ID)
{
// Create Instance of Connection and Command Object
SqlConnection myConnection = new SqlConnection(ConfigurationSettings.AppSettings["ESMS"]);
SqlCommand myCommand = new SqlCommand("ProductsDelete", myConnection);
// Mark the Command as a SPROC
myCommand.CommandType = CommandType.StoredProcedure;
// Add Parameters to SPROC
SqlParameter parameterID = new SqlParameter("@ID", SqlDbType.Int );
parameterID.Value = ID;
myCommand.Parameters.Add(parameterID);
// Open the database connection and execute the command
myConnection.Open();
myCommand.ExecuteNonQuery();
myConnection.Close();
}
public void ProductViewTimesAdd(int ID)
{
// Create Instance of Connection and Command Object
SqlConnection myConnection = new SqlConnection(ConfigurationSettings.AppSettings["ESMS"]);
SqlCommand myCommand = new SqlCommand("ProductViewTimesAdd", myConnection);
// Mark the Command as a SPROC
myCommand.CommandType = CommandType.StoredProcedure;
// Add Parameters to SPROC
SqlParameter parameterID = new SqlParameter("@ID", SqlDbType.Int );
parameterID.Value = ID;
myCommand.Parameters.Add(parameterID);
// Open the database connection and execute the command
myConnection.Open();
myCommand.ExecuteNonQuery();
myConnection.Close();
}
<< 上一页 [11] [12] [13] [14] [15] [16] [17] [18] [19] [20] ... 下一页 >>
ASP+SQL SERVER2000电子商城系统 第19页下载如图片无法显示或论文不完整,请联系qq752018766