手机版

C 经典购物车流程全代码(2)

时间:2025-04-25   来源:未知    
字号:

C# 经典购物车流程全代码 asp.net 经典毕业设计

MailAddress from = new MailAddress("clear_rm@", "Fei_L", encoding);

MailAddress to = new MailAddress(address);

MailMessage mail = new MailMessage(from, to);

mail.Subject = biaoti;

mail.Body = content;

mail.SubjectEncoding = encoding;

mail.BodyEncoding = encoding;

SmtpClient smtp = new SmtpClient("");

smtp.DeliveryMethod = work;

eDefaultCredentials = true;

smtp.Credentials = new workCredential("clear_rm@", "061110"); smtp.Send(mail);

dbcon.message("会员注册成功,请登录邮件激活会员!");

六.产品添加

protected void Button1_Click(object sender, EventArgs e)

{SqlConnection conn = dbcon.conn();

conn.Open();

SqlCommand cmd_rz = new SqlCommand("select count(*) from shop where sortid='" + TextBox6.Text + "'", conn);

int num_rz = (int)cmd_rz.ExecuteScalar();

conn.Close();

if (num_rz > 0)

{dbcon.message("此产品编号已登记!");

}

else{

if (DropDownList1.SelectedItem.Text == "产品分类")

{dbcon.message("请选择分类!");

}

else

{conn.Open();

SqlCommand cmd=new SqlCommand ("insert into shop(sortid, sortname, product, ,buy, inventory, discount, price, path, parentpath) values ('" + TextBox6.Text + "','" + TextBox1.Text+ "','" + FCKeditor1.Value+ "','" + TextBox3.Text + "','" + TextBox3.Text+ "','" + TextBox4.Text+ "','" +(int.Parse(TextBox5.Text) * int.Parse(TextBox4.Text)).ToString()+ "','" +Session["picid"].ToString()+ "','" + DropDownList1.SelectedItem.Text + "')", conn);

int num = cmd.ExecuteNonQuery();

conn.Close();

if (num > 0) dbcon.message("添加产品成功!");

}

}

}

七.用户登录状态的保存

if (Session["uid"] != null)

{string uid = "";

C 经典购物车流程全代码(2).doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印
×
二维码
× 游客快捷下载通道(下载后可以自由复制和排版)
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
注:下载文档有可能出现无法下载或内容有问题,请联系客服协助您处理。
× 常见问题(客服时间:周一到周五 9:30-18:00)