public override OrderProduct CreateOrderProduct(int productId, int quantity, OrderType opType, System.Collections.Specialized.NameValueCollection paras) { CommOrderProduct op = null; string sql = "Product_GetOrderProduct_Common"; DbCommand comm = CommDataAccess.DbReader.GetStoredProcCommand(sql); CommDataAccess.DbReader.AddInParameter(comm, "ProductId", DbType.Int32, productId); using (IDataReader reader = CommDataAccess.DbReader.ExecuteReader(comm)) { if (reader.Read()) { op = BuildModel(reader); op.SetQuantiy(quantity); op.ProductType = opType; int typecode; if (int.TryParse(paras["typecode"], out typecode)) { typecode = 0; } op.TypeCode = typecode; } } return(op); }