企业网站建设毕业设计代码06
时间:2023-08-16 06:45:02 | 来源:网站运营
时间:2023-08-16 06:45:02 来源:网站运营
企业网站建设毕业设计代码06:企业网站建设毕业设计代码06
社会计算
}
public float Outletsprice
{
get { return outletsprice; }
set { outletsprice = value; }
}
public float Uniprice
{
get { return uniprice; }
set { uniprice = value; }
}
public int Stock
{
get { return stock; }
set { stock = value; }
}
public int KindId
{
get { return kindId; }
set { kindId = value; }
}
public int SupId
{
get { return supId; }
set { supId = value; }
}
public int ResId
{
get { return resId; }
set { resId = value; }
}
public string ProDesc
{
get { return proDesc; }
set { proDesc = value; }
}
public string ProName
{
get { return proName; }
set { proName = value; }
}
public int ProId
{
get { return proId; }
set { proId = value; }
}
}
}
1.corpdal类库下dalproduct类代码如下:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.SqlClient;
using corpmodel;
namespace corpdal
{
public class dalproduct
{ SqlHelp SqlHelp = null;
DataSet ds = null;
public dalproduct()
{
SqlHelp = new SqlHelp();
}
public DataSet SellAll()
{
string sql = "select *from T_cropproduct";
DataSet ds = new DataSet();
using (ds = SqlHelp.sell(sql))
{
return ds;
}
}
public DataSet SellAllTime()
{
string sql = "select *from T_cropproduct order by Pubdate";
DataSet ds = new DataSet();
using (ds = SqlHelp.sell(sql))
{
return ds;
}
}
public DataSet SellAllStock()
{
string sql = "select *from T_cropproduct order by Stock";
DataSet ds = new DataSet();
using (ds = SqlHelp.sell(sql))
{
return ds;
}
}
public DataSet Single(product product1)
{
string sql = "select *from T_cropproduct where KindId=@KindId";
SqlParameter[] para = {
new SqlParameter ("@KindId",product1 .KindId )
};
DataSet ds = new DataSet();
using (ds = SqlHelp.sellsingle(sql, para))
{
return ds;
}
}
public DataSet Single_proname(product product1)
{
string sql = "select * from T_cropproduct where ProName=@ProName";
SqlParameter[] para = {
new SqlParameter ("@ProName",product1.ProName )
};
DataSet ds = new DataSet();
using (ds = SqlHelp.sellsingle(sql, para))
{
return ds;
}
}
public DataSet Single_SupId(product product1)
{
string sql = "select * from T_cropproduct where SupId=@SupId";
SqlParameter[] para = {
new SqlParameter ("@SupId",product1.SupId )
};
DataSet ds = new DataSet();
using (ds = SqlHelp.sellsingle(sql, para))
{
return ds;
}
}
public DataSet Single_KindIdTime(product product1)
{
string sql = "select * from T_cropproduct where KindId=@KindId order by Pubdate DESC";
SqlParameter[] para = {
new SqlParameter ("@KindId",product1.KindId )
};
DataSet ds = new DataSet();
using (ds = SqlHelp.sellsingle(sql, para))
{
return ds;
}
}
public DataSet Single_KindIdStock(product product1)
{
string sql = "select * from T_cropproduct where KindId=@KindId order by Stock";
SqlParameter[] para = {
new SqlParameter ("@KindId",product1.KindId )
};
DataSet ds = new DataSet();
using (ds = SqlHelp.sellsingle(sql, para))
{
return ds;
}
}
public bool insert(product product1)
{
string sql = "insert into T_cropproduct values(@ProName,@ProDesc,@ResId,@SupId,@KindId,@Stock,@Uniprice,@Outletsprice,@Pubdate,@Detail)";
SqlParameter[] para = {
new SqlParameter ("@ProName",product1.ProName ),
new SqlParameter("@ProDesc",product1.ProDesc ),
new SqlParameter ("@ResId",product1.ResId ),
new SqlParameter ("@SupId",product1.SupId ),
new SqlParameter ("@KindId",product1.KindId ),
new SqlParameter("@Stock",product1.Stock ),
new SqlParameter ("@Uniprice",product1.Uniprice ),
new SqlParameter ("@Outletsprice",product1.Outletsprice ),
new SqlParameter ("@Pubdate",product1.Pubdate ),
new SqlParameter ("@Detail",product1.Detail)
};
if (SqlHelp.ExecuteNonQuery(sql, para) > 0)
{
return true;
}
else
{
return false;
}
}
public bool update(product product1)
{
string sql = "update T_cropproduct set ProName=@ProName,ProDesc=@ProDesc,ResId=@ResId,SupId=@SupId,KindId=@KindId,Stock=@Stock,Uniprice=@Uniprice,Outletsprice=@Outletsprice,Pubdate=@Pubdate,Detail=@Detail where ProId=@ProId";
SqlParameter[] para = {
new SqlParameter ("@ProId",product1.ProId ),
new SqlParameter ("@ProName",product1.ProName ),
new SqlParameter("@ProDesc",product1.ProDesc ),
new SqlParameter ("@ResId",product1.ResId ),
new SqlParameter ("@SupId",product1.SupId ),
new SqlParameter ("@KindId",product1.KindId ),
new SqlParameter("@Stock",product1.Stock ),
new SqlParameter ("@Uniprice",product1.Uniprice ),
new SqlParameter ("@Outletsprice",product1.Outletsprice ),
new SqlParameter ("@Pubdate",product1.Pubdate ),
new SqlParameter ("@Detail",product1.Detail)
};
if (SqlHelp.ExecuteNonQuery(sql, para) > 0)
{
return true;
}
else
{
return false;
}
}
public bool delete(product product1)
{
string sql = "delete from T_cropproduct where ProId=@ProId";
SqlParameter[] para = {
new SqlParameter ("@ProId",product1.ProId )
};
if (SqlHelp.ExecuteNonQuery(sql, para) > 0)
{
return true;
}
else
{
return false;
}
}
}
}
2.corpbll类库下bllproduct类代码如下:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.SqlClient;
using corpmodel;
using corpdal;
namespace corpbll
{
public class bllproduct
{
dalproduct dalproduct1 = new dalproduct();
public DataSet SellAll()
{
return dalproduct1.SellAll();
}
public DataSet SellAllTime()
{
return dalproduct1.SellAllTime();
}
public DataSet SellAllStock()
{
return dalproduct1.SellAllStock();
}
public DataSet Single(product product1)
{
return dalproduct1.Single(product1);
}
public DataSet Single_proname(product product1)
{
return dalproduct1.Single_proname(product1);
}
public DataSet Single_SupId(product product1)
{
return dalproduct1.Single_SupId(product1);
}
public DataSet Single_KindIdTime(product product1)
{
return dalproduct1.Single_KindIdTime(product1);
}
public DataSet Single_KindIdStock(product product1)
{
return dalproduct1.Single_KindIdStock(product1);
}
public bool insert(product product1)
{
return dalproduct1.insert(product1);
}
public bool update(product product1)
{
return dalproduct1.update(product1);
}
public bool delete(product product1)
{
return dalproduct1.delete(product1);
}
}
}
4.2 Web层下窗体
4.2.1普通用户登录界面
Web层下普通用户登录页面:
图4-1 普通用户登录页面图
只需要用户名密码便可以登录,若还没有注册的用户可以点击注册进入Register.aspx注册页面进行注册。
4.2.2订单页面
Web层下order.aspx订单页面如下:
图4-2订单页面
订单页面包括购物基本情况(订单号、数量、总的金额,订货人基本情况(姓名、地址、邮编)以及收货人的基本情况(姓名、地址、邮编)。
4.2.3购物车页面
Web层下购物车页面如下:
图4-3 购物车页面
购物车读取选择的产品的基本信息,并把产品购买数量默认设置为1,在购物车里允许修改,可以删除暂时不够的产品。点击进入结算中心进行结算。