資源簡介
c#整套微信開發源碼 免分
代碼片段和文件信息
using?System;
using?System.Collections.Generic;
using?System.Linq;
using?System.Web;
using?MxWeiXinPF.Common;
using?System.Text;
namespace?MxWeiXinPF.Web.shop
{
????///?
????///?shopmgr?的摘要說明
????///?
????public?class?shopmgr?:?IHttpHandler
????{
????????public?void?ProcessRequest(HttpContext?context)
????????{
????????????context.Response.ContentType?=?“text/json“;
????????????BLL.wx_shop_cart?cartBll?=?new?BLL.wx_shop_cart();
????????????string?_action?=?MyCommFun.QueryString(“myact“);???????
????????????string?openid?=?MyCommFun.RequestOpenid();??//得到微信用戶的openid
????????????Dictionary?jsonDict?=?new?Dictionary();
????????????if?(_action?==?“addCart“)
????????????{
????????????????#region?添加購物車
????????????????try
????????????????{
????????????????????int?wid?=?MyCommFun.RequestInt(“wid“);
????????????????????int?productId?=?MyCommFun.RequestInt(“productid“);
????????????????????int?skuId?=?MyCommFun.RequestInt(“mid“);
????????????????????string?skuInfo?=?MyCommFun.QueryString(“attr“);
????????????????????int?productNum?=?MyCommFun.RequestInt(“bc“);
????????????????????decimal?totalPrice?=?(decimal)MyCommFun.RequestFloat(“totprice“?0);
????????????????
????????????????????Model.wx_shop_cart?cart?=?new?Model.wx_shop_cart();
????????????????????IList?cartList?=?cartBll.GetModelList(“productId=“?+?productId?+?“?and?openid=‘“?+?openid?+?“‘?and?skuId=“+skuId);
????????????????????bool?isAdd?=?true;
????????????????????if?(cartList?!=?null?&&?cartList.Count?>?0)
????????????????????{
????????????????????????isAdd?=?false;
????????????????????????cart?=?cartList[0];
????????????????????}
????????????????????if?(isAdd)
????????????????????{
????????????????????????cart.createDate?=?DateTime.Now;
????????????????????????cart.openid?=?openid;
????????????????????????cart.productId?=?productId;
????????????????????????cart.productNum?=?productNum;
????????????????????????cart.skuId?=?skuId;
????????????????????????cart.skuInfo?=?skuInfo;
????????????????????????cart.totPrice?=?totalPrice?*?productNum;
????????????????????????cart.wid?=?wid;
????????????????????????int?ret?=?cartBll.Add(cart);
????????????????????????if?(ret?>?0)
????????????????????????{
????????????????????????????jsonDict.Add(“errCode“?“false“);
????????????????????????}
????????????????????????else
????????????????????????{
????????????????????????????jsonDict.Add(“errCode“?“true“);
????????????????????????}
????????????????????}
????????????????????else
????????????????????{
????????????????????????cart.openid?=?openid;
????????????????????????cart.productNum?+=?productNum;
????????????????????????cart.skuId?=?skuId;
????????????????????????cart.skuInfo?=?skuInfo;
????????????????????????cart.totPrice?+=?totalPrice?*?productNum;
????????????????????????cart.wid?=?wid;
????????????????????????bool?ret?=?cartBll.Update(cart);
??????????
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???13500416??2015-02-27?13:26??weixin\Data\mxweixin.mdf
?????文件????1048576??2015-02-27?13:26??weixin\Data\mxweixin_log.ldf
????....SH.????????95??2015-02-26?12:47??weixin\Desktop.ini
?????文件?????311296??2014-05-04?13:43??weixin\dll\Beyondbit.fr
?????文件??????49664??2014-05-04?13:43??weixin\dll\LitJSON.dll
?????文件?????429056??2014-05-04?13:43??weixin\dll\Newtonsoft.Json.dll
?????文件??????83968??2014-05-04?13:43??weixin\dll\Senparc.Weixin.MP.dll
?????文件????????155??2014-08-11?20:28??weixin\mssccprj.scc
?????文件??????49664??2014-05-04?13:43??weixin\MxWeiXinPF.API\bin\Debug\LitJSON.dll
?????文件??????55808??2015-02-27?11:01??weixin\MxWeiXinPF.API\bin\Debug\MxWeiXinPF.API.dll
?????文件?????359936??2015-02-27?11:01??weixin\MxWeiXinPF.API\bin\Debug\MxWeiXinPF.API.pdb
?????文件?????198144??2015-02-27?11:01??weixin\MxWeiXinPF.API\bin\Debug\MxWeiXinPF.BLL.dll
?????文件????1732096??2015-02-27?11:01??weixin\MxWeiXinPF.API\bin\Debug\MxWeiXinPF.BLL.pdb
?????文件??????71168??2015-02-27?11:01??weixin\MxWeiXinPF.API\bin\Debug\MxWeiXinPF.Common.dll
?????文件?????224768??2015-02-27?11:01??weixin\MxWeiXinPF.API\bin\Debug\MxWeiXinPF.Common.pdb
?????文件?????992256??2015-02-27?11:01??weixin\MxWeiXinPF.API\bin\Debug\MxWeiXinPF.DAL.dll
?????文件????2233856??2015-02-27?11:01??weixin\MxWeiXinPF.API\bin\Debug\MxWeiXinPF.DAL.pdb
?????文件??????18432??2015-02-27?11:01??weixin\MxWeiXinPF.API\bin\Debug\MxWeiXinPF.DBUtility.dll
?????文件??????56832??2015-02-27?11:01??weixin\MxWeiXinPF.API\bin\Debug\MxWeiXinPF.DBUtility.pdb
?????文件?????240128??2015-02-27?11:01??weixin\MxWeiXinPF.API\bin\Debug\MxWeiXinPF.Model.dll
?????文件????2104832??2015-02-27?11:01??weixin\MxWeiXinPF.API\bin\Debug\MxWeiXinPF.Model.pdb
?????文件??????33280??2015-02-27?11:01??weixin\MxWeiXinPF.API\bin\Debug\MxWeiXinPF.WeiXinComm.dll
?????文件?????118272??2015-02-27?11:01??weixin\MxWeiXinPF.API\bin\Debug\MxWeiXinPF.WeiXinComm.pdb
?????文件??????83968??2014-05-04?13:43??weixin\MxWeiXinPF.API\bin\Debug\Senparc.Weixin.MP.dll
?????文件??????49664??2014-05-04?13:43??weixin\MxWeiXinPF.API\bin\Release\LitJSON.dll
?????文件??????51712??2014-07-20?11:39??weixin\MxWeiXinPF.API\bin\Release\MxWeiXinPF.API.dll
?????文件?????171520??2014-07-20?11:39??weixin\MxWeiXinPF.API\bin\Release\MxWeiXinPF.API.pdb
?????文件?????155136??2014-07-20?11:39??weixin\MxWeiXinPF.API\bin\Release\MxWeiXinPF.BLL.dll
?????文件?????869888??2014-07-20?11:39??weixin\MxWeiXinPF.API\bin\Release\MxWeiXinPF.BLL.pdb
?????文件??????65536??2014-07-20?11:38??weixin\MxWeiXinPF.API\bin\Release\MxWeiXinPF.Common.dll
............此處省略6957個文件信息
評論
共有 條評論