-
大小: 2.55MB文件類型: .xz金幣: 1下載: 0 次發(fā)布日期: 2023-10-02
- 語(yǔ)言: C#
- 標(biāo)簽: 課程設(shè)計(jì)??
資源簡(jiǎn)介
應(yīng)用技術(shù)成熟的ASP.NET和SQL SERVER 架構(gòu)來(lái)實(shí)現(xiàn)。讓用戶享受購(gòu)物模式的便利性,為企業(yè)提供了新的途徑。它以網(wǎng)絡(luò)為基礎(chǔ),幫助用戶和商家解決傳統(tǒng)購(gòu)物模式的所出現(xiàn)的問(wèn)題。降低企業(yè)和個(gè)人的成本將信息有效的共享,在提供安全的交易平臺(tái)下,是一種高效率可移植可擴(kuò)展的分布式購(gòu)物系統(tǒng)。本課題實(shí)現(xiàn)商品展示、用戶訂單管理、購(gòu)物車功能和訂單提交功能以及后臺(tái)綜合功能管理模塊。
代碼片段和文件信息
using?System;
using?System.Collections.Generic;
using?System.Linq;
using?System.Web;
using?System.Web.UI;
using?System.Web.UI.WebControls;
using?System.Data.SqlClient;
public?partial?class?_Default?:?System.Web.UI.Page
{
????protected?void?Page_Load(object?sender?EventArgs?e)
????{
???????
????}
????protected?void?Button2_Click(object?sender?EventArgs?e)
????{
????????SqlConnection?conn?=?new?SqlConnection();
????????conn.ConnectionString?=?“Data?Source=HU-PC;initial?catalog=net課程設(shè)計(jì);integrated?security=sspi“;
????????string?strUname?=?TextBox2.Text;
????????string?strpwd?=?TextBox3.Text;
????????string?strsql?=?“select?ident?from?userinfo?where?用戶名=‘“?+?strUname+“‘?and?密碼=‘“+strpwd+“‘“;
????????conn.Open();
????????SqlCommand?comm?=?new?SqlCommand(strsql?conn);
????????object?x?=?comm.ExecuteScalar();
????????int?intident;
????????if?(x?==?null)
????????{
????????????Label4.Text?=?“你輸入的用戶名或密碼不正確?!?
????????????Label4.ForeColor?=?System.Drawing.Color.Red;
????????????Session[“pass“]?=?null;
????????}
????????else
????????{
????????????Session[“pass“]?=?“right“;
????????????Session[“username“]?=?strUname;
????????????intident?=?(int)x;
????????????if?(intident?==?0)
????????????{
????????????????Label4.Text?=?““;
????????????????Response.Redirect(“master.aspx?name=“?+?TextBox2.Text);
????????????}
????????????else?if?(intident?==?1)???//普通會(huì)員
????????????{
????????????????Label4.Text?=?““;
????????????????Response.Redirect(“商品首頁(yè).aspx?name=“?+?TextBox2.Text);
????????????}
????????}???
????????conn.Close();
????}
????protected?void?Button3_Click(object?sender?EventArgs?e)
????{
????????Response.Redirect(“register.aspx?name=“);
????}
}
評(píng)論
共有 條評(píng)論