Web/ajax/bindmyshopcard.aspx.cs

(开头部分) 3KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

#region license
/**********************************************
* CopyRight (c) 2009-2010 HangJing Teconology. All Rights Re* Function :
*  at 2011-6-6 20:58:56.
* E-Mail: jijunjian@iWMPT.com
*********************************************** */
#endregion
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using WMPT.SQLServerDAL;
using WMPT.Common;
using WMPT.Model;

/// <summary>
/// 提交订单的地方绑定优惠券
/// </summary>
public partial class Ajax_bindmycardbindmyshopcard : System.Web.UI.Page
{
    ShopCard dal = new ShopCard();
    protected void Page_Load(object sender, EventArgs e)
    {
        string pwd = WebUtility.InputText(Request["pwd"]);
        Response.Clear();
        string ret = "{'code':'0','msg':''}";
        ECustomerInfo user = UserHelp.GetUser();
        if (user == null)
        {
            ret = "{'code':'-1','msg':'您还没有登录,请登录'}";
        }
        else
        {
            //根据编号和密码绑定
            string sql = "ckey = '" + pwd + "'";
            IList<ShopCardInfo> cardlist = dal.GetList(1, 1, sql, "cid", 1);
            if (cardlist.Count == 0)
            {
                ret = "{'code':'-2','msg':'优惠券券号有有误,请重新输入'}";
            }
            else
            {
                //判断有没有激活,有没有绑定
                if (cardlist[0].Inve2 == "0")
                {
                    ret = "{'code':'-3','msg':'此优惠券未激活,不能绑定'}";
                }
                else
                {
                    if (cardlist[0].State == 1)
                    {
                        ret = "{'code':'-4','msg':'此优惠券已经绑定'}";
                    }
                    else
                    {
                        sql = "update ShopCard set usergettime = '" + DateTime.Now.ToString() + "' , state =1 , userid = " + user.DataID + ",username = '" + user.Name + "' where CID in (" + cardlist[0].CID + ")";
                        if (WebUtility.excutesql(sql) > 0)
后面还有 24 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。