毕业论文论文范文课程设计实践报告法律论文英语论文教学论文医学论文农学论文艺术论文行政论文管理论文计算机安全
您现在的位置: 毕业论文 >> 论文 >> 正文

ASP+SQL SERVER2000电子商城系统 第29页

更新时间:2007-10-19:  来源:毕业论文

       myCommand.Parameters.Add(parameterCategoryID);
 
                     SqlParameter parameterImageData  = new SqlParameter("@ImageData ", SqlDbType.Image);
                     parameterImageData.Value = ImageData ;
                     myCommand.Parameters.Add(parameterImageData );
 
                     SqlParameter parameterNewGrade = new SqlParameter("@NewGrade", SqlDbType.Char ,6);
                     parameterNewGrade.Value = NewGrade;
                     myCommand.Parameters.Add(parameterNewGrade);
 
                     myConnection.Open();
                     myCommand.ExecuteNonQuery();
                     myConnection.Close();
 
                    
             
              }
 
 
 
 
//显示详细求购信息。
 
              public SqlDataReader RequireDetail(int ID)
              {
                    
                     // Create Instance of Connection and Command Object
                     SqlConnection myConnection = new SqlConnection(ConfigurationSettings.AppSettings["ESMS"]);
                     SqlCommand myCommand = new SqlCommand("RequireDetail", 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);
 
                     // Execute the command
                     myConnection.Open();
                     SqlDataReader result = myCommand.ExecuteReader(CommandBehavior.CloseConnection);
           
                     // Return the datareader
                     return result;
             
              }
             
//显示近期的求购信息。
                     public SqlDataReader RequireIndex()
                     {
                    
                            // Create Instance of Connection and Command Object
                            SqlConnection myConnection = new SqlConnection(ConfigurationSettings.AppSettings["ESMS"]);
                            SqlCommand myCommand = new SqlCommand("RequireIndex", myConnection);
 
                            // Mark the Command as a SPROC
                            myCommand.CommandType = CommandType.StoredProcedure;
 
                            // Add Parameters to SPROC
                           
                            // Execute the command
                            myConnection.Open();
                            SqlDataReader result = myCommand.ExecuteReader(CommandBehavior.CloseConnection);
                                        // Return the datareader
                            return result;
                                   }
 
显示近期的求购信息:
 
前台代码:
<asp:DataList id="DataList1" runat="server">
                                                                                                                       <ItemTemplate>
                                                                                                                              <FONT color="#ff3300" size="2">[求购]</FONT><A  target=_blank href='Product\\showRequireDetail.aspx?requireID=<%# DataBinder.Eval(Container.DataItem,"ID") %>'><%# DataBinder.Eval(Container.DataItem,"productName") %></A>
                                                                                                                       </ItemTemplate>
                                                                                                                </asp:DataList>
 
后台代码:
          
//绑定供求信息
 
                     productDB PDB=new productDB();
 
                     DataList1.DataSource=PDB.RequireIndex();
                     DataList1.DataBind();
 
 
添加求购信息:
 
private void requireAdd_Click(object sender, System.EventArgs e)
              {
                     //get imageData
                     HttpPostedFile UpFile = imageFile.PostedFile;
 
                     int FileLength =  UpFile.ContentLength;
                     Byte[] ImageData =new Byte[FileLength];
                     Stream StreamObject= UpFile.InputStream ;
                     StreamObject.Read(ImageData,0,FileLength);
                     int CompanyID=int.Parse(Session["CompanyID"].ToString());
                     int ClientID =int.Parse(Session["ClientID"].ToString());
                     DateTime EndDate=Calendar1.SelectedDate;
             
                     productDB PDB =new productDB();
                     PDB.RequirementAdd(CompanyID,ClientID,name.Text,intro.Value,int.Parse(amount.Text),"¥"+unitPrice.Text+" -¥"+topPrice.Text,
                            EndDate,int.Parse(Session["CategoryID"].ToString()),ImageData,newGrade.SelectedValue);
 
       }

 << 上一页  [21] [22] [23] [24] [25] [26] [27] [28] [29] [30]  ... 下一页  >> 

ASP+SQL SERVER2000电子商城系统 第29页下载如图片无法显示或论文不完整,请联系qq752018766
设为首页 | 联系站长 | 友情链接 | 网站地图 |

copyright©751com.cn 辣文论文网 严禁转载
如果本毕业论文网损害了您的利益或者侵犯了您的权利,请及时联系,我们一定会及时改正。