Esempio n. 1
0
        // GET: activity/W20160926
        public ActionResult Index(string invitedcode = "")
        {
            if (!string.IsNullOrEmpty(invitedcode))
            {
                Initial(invitedcode);
            }
            bool hadUsed = false;

            ViewBag.CanUseCount = GetCanUseTimes(ref hadUsed);

            string invitationCode = "";
            int    userID         = Settings.Instance.CurrentUserId;

            if (userID < 1)
            {
                invitationCode = "";
            }
            else
            {
                B_member_table bllUser = new B_member_table();
                M_member_table user    = bllUser.GetModel(userID);
                if (user == null || user.registerid <= 0)
                {
                    invitationCode = "";
                }
                else
                {
                    invitationCode = user.invitedcode;
                }
            }
            TXShareHelper tx = new TXShareHelper();

            #region TXShareHelper 赋值逻辑
            //tx.link = Request.Url.AbsoluteUri.Replace(Request.Url.AbsolutePath, "") + "/register/?invitedcode=" + invitationCode;//
            tx.link = Request.Url.AbsoluteUri.ToString().Trim();
            tx.CheckSignature(tx.link);

            tx.appid = Utils.GetAppSetting("WeiXinAppid");
            tx.title = "金秋十月收获季,创利投给您送红包啦!";
            if (Utils.GetAppSetting("DeBug") == "1")
            {
                tx.imgUrl = Utils.GetAppSetting("MDeBugURL") + "Images/shareoutimg.jpg";
            }
            else
            {
                tx.imgUrl = Utils.GetAppSetting("MReleaseURL") + "Images/shareoutimg.jpg";
            }
            tx.desc = "金秋十月收获季节,创利投为您锦上添花!动动手指,注册完成就能领现金哦……";

            #endregion
            //ViewBag.InvCode = invitationCode;
            ViewBag.linkOutUrl    = Request.Url.AbsoluteUri.ToString().Trim().Split('?')[0] + "?invitedcode=" + invitationCode;
            ViewBag.TXShareHelper = tx;
            return(View());
        }
Esempio n. 2
0
        /// <summary>
        /// 邀请列表
        /// </summary>
        /// <returns></returns>
        public ActionResult List(int pageIndex = 1)
        {
            int    userid      = ChuanglitouP2P.Common.Settings.Instance.CurrentUserId;
            string invitedcode = string.Empty;

            if (userid > 0)
            {
                string    sql = "select registerid,invitedcode from hx_member_table where registerid='" + userid + "' ";
                DataTable dt  = DbHelperSQL.GET_DataTable_List(sql);
                invitedcode += "register/index?invitedcode=" + dt.Rows[0]["invitedcode"].ToString();
            }
            string shareUrl = Utils.GetAppSetting("MReleaseURL") + invitedcode;

            TXShareHelper tx = new TXShareHelper();

            #region TXShareHelper 赋值逻辑
            tx.link = Request.Url.AbsoluteUri.ToString().Trim();
            tx.CheckSignature(tx.link);
            tx.appid = Utils.GetAppSetting("WeiXinAppid");
            tx.title = "来创利投金服,新手理财送好礼,现金红包送不停";
            if (Utils.GetAppSetting("DeBug") == "1")
            {
                tx.imgUrl = Utils.GetAppSetting("MDeBugURL") + "Images/xrzcshl.jpg";
            }
            else
            {
                tx.imgUrl = Utils.GetAppSetting("MReleaseURL") + "Images/xrzcshl.jpg";
            }
            tx.desc = "来创利投金服,新手理财送好礼,现金红包送不停";
            tx.link = shareUrl;

            #endregion
            // var list = ef.V_YaoQinList.Where(p => p.membertable_registerid == userid).OrderByDescending(p => p.Createtime).ToPagedList(pageIndex ?? 1, pgaesize);
            int pageSize  = 5;
            int pageCount = 0;
            int count     = ef.V_YaoQinList.Where(p => p.membertable_registerid == userid).Count();
            if (count > 0)
            {
                if (count % pageSize > 0)
                {
                    pageCount = count / pageSize + 1;
                }
                else
                {
                    pageCount = count / pageSize;
                }
            }
            pageIndex = pageIndex <= 1 ? 1 : pageIndex;
            pageIndex = pageIndex >= pageCount ? pageCount : pageIndex;
            var list = ef.V_YaoQinList.Where(p => p.membertable_registerid == userid).OrderByDescending(a => a.Createtime).ToPagedList(pageIndex, pageSize);
            ViewBag.pageCount     = pageCount;
            ViewBag.pageIndex     = pageIndex;
            ViewBag.TXShareHelper = tx;
            return(View(list));
        }
Esempio n. 3
0
        // GET: register
        public ActionResult Index(string invitedcode = "")
        {
            string cInvitedcode = Utils.CheckSQLHtml(DNTRequest.GetString("channel"));

            if (!string.IsNullOrEmpty(cInvitedcode))
            {
                var keyValue = new Dictionary <string, string>();
                keyValue.Add("Invitedcode", cInvitedcode);
                Utils.SetInvCookie("channel", keyValue);
                Utils.SetInvCookie("Invitation", keyValue, -1);
            }

            invitedcode = Utils.CheckSQLHtml(invitedcode);
            if (!string.IsNullOrWhiteSpace(invitedcode))
            {
                string sql = "select registerid,invitedcode from hx_member_table where invitedcode='" + invitedcode + "' ";

                DataTable dt = DbHelperSQL.GET_DataTable_List(sql);
                if (dt.Rows.Count > 0)
                {
                    HttpCookie c*k = new HttpCookie("Invitation");
                    c*k.Values.Add("InvCode", DESEncrypt.Encrypt(invitedcode, ConfigurationManager.AppSettings["webp"].ToString()));
                    c*k.Values.Add("CodeUid", DESEncrypt.Encrypt(dt.Rows[0]["registerid"].ToString(), ConfigurationManager.AppSettings["webp"].ToString()));
                    c*k.Expires = DateTime.Now.AddDays(1);
                    Response.AppendCookie(c*k);
                }
            }
            TXShareHelper tx = new TXShareHelper();

            #region TXShareHelper 赋值逻辑
            tx.link = Request.Url.AbsoluteUri.ToString().Trim();
            tx.CheckSignature(tx.link);
            tx.appid = Utils.GetAppSetting("WeiXinAppid");
            tx.title = "来创利投金服,新手理财送好礼,现金红包送不停";
            if (Utils.GetAppSetting("DeBug") == "1")
            {
                tx.imgUrl = Utils.GetAppSetting("MDeBugURL") + "Images/xrzcshl.jpg";
            }
            else
            {
                tx.imgUrl = Utils.GetAppSetting("MReleaseURL") + "Images/xrzcshl.jpg";
            }
            tx.desc = "创利投金服,新手理财送好礼,现金红包送不停";
            #endregion

            ViewBag.TXShareHelper = tx;
            return(View());
        }
Esempio n. 4
0
        // GET: activity/W20161110
        public ActionResult Index()
        {
            int    userid      = ChuanglitouP2P.Common.Settings.Instance.CurrentUserId;
            string yqUrl       = userid <= 0 ? "/login.html" : "/Invitation/List";
            string tzUrl       = userid <= 0 ? "/login.html" : "/index.html";
            string invitedcode = string.Empty;

            if (userid > 0)
            {
                string    sql = "select registerid,invitedcode from hx_member_table where registerid='" + userid + "' ";
                DataTable dt  = DbHelperSQL.GET_DataTable_List(sql);
                invitedcode += "register/index?invitedcode=" + dt.Rows[0]["invitedcode"].ToString();
            }
            string shareUrl = Utils.GetAppSetting("MReleaseURL") + invitedcode;

            TXShareHelper tx = new TXShareHelper();

            #region TXShareHelper 赋值逻辑
            tx.link = Request.Url.AbsoluteUri.ToString().Trim();
            tx.CheckSignature(tx.link);
            tx.appid = Utils.GetAppSetting("WeiXinAppid");
            tx.title = "邀请好友来投资,双方都有奖励奖励无上限!送3重豪礼不限量 iPhone7 plus等你拿!!";
            if (Utils.GetAppSetting("DeBug") == "1")
            {
                tx.imgUrl = Utils.GetAppSetting("MDeBugURL") + "Images/yhynhl.jpg";
            }
            else
            {
                tx.imgUrl = Utils.GetAppSetting("MReleaseURL") + "Images/yhynhl.jpg";
            }
            tx.desc = "邀请好友来投资,双方都有奖励奖励无上限!送3重豪礼不限量 iPhone7 plus等你拿!!";
            tx.link = shareUrl;
            #endregion
            ViewBag.TXShareHelper = tx;
            ViewBag.YqUrl         = yqUrl;
            ViewBag.TzUrl         = tzUrl;
            return(View());
        }
Esempio n. 5
0
        // GET: activity/W20170106
        public ActionResult Index()
        {
            int    userid      = ChuanglitouP2P.Common.Settings.Instance.CurrentUserId;
            string yqUrl       = userid <= 0 ? "/login.html" : "/Invitation/List";
            string tzUrl       = userid <= 0 ? "/login.html" : "/index.html";
            string invitedcode = "";

            if (userid > 0)
            {
                string    sql = "select registerid,invitedcode from hx_member_table where registerid='" + userid + "' ";
                DataTable dt  = DbHelperSQL.GET_DataTable_List(sql);
                invitedcode += dt.Rows[0]["invitedcode"].ToString();
            }
            string shareUrl = (invitedcode == "" ? "http://www.chuanglitou.cn/" : "http://www.chuanglitou.cn/Invitation/" + invitedcode + ".html");// Utils.GetAppSetting("MReleaseURL") + invitedcode;

            TXShareHelper tx = new TXShareHelper();

            #region TXShareHelper 赋值逻辑
            tx.link = shareUrl;// Request.Url.AbsoluteUri.ToString().Trim();
            tx.CheckSignature(tx.link);
            tx.appid = Utils.GetAppSetting("WeiXinAppid");
            tx.title = "邀请好友来投资,双方都有奖励奖励无上限!送3重豪礼不限量 iPhone7 plus等你拿!!";
            if (Utils.GetAppSetting("DeBug") == "1")
            {
                tx.imgUrl = Utils.GetAppSetting("MDeBugURL") + "Images/yhynhl.jpg";
            }
            else
            {
                tx.imgUrl = Utils.GetAppSetting("MReleaseURL") + "Images/yhynhl.jpg";
            }
            tx.desc = "邀请好友来投资,双方都有奖励奖励无上限!送3重豪礼不限量 iPhone7 plus等你拿!!";
            tx.link = shareUrl;
            #endregion
            ViewBag.TXShareHelper = tx;
            ViewBag.YqUrl         = yqUrl;
            ViewBag.TzUrl         = tzUrl;



            string codesql = "select TOP 5 (SELECT  mobile from hx_member_table where registerid = Invpeopleid) mobile,count(invcode) invcode from hx_td_Userinvitation where invtime >= '2017/1/6 00:00:00' AND invtime <= '2017/3/31 23:59:59' GROUP BY Invpeopleid ORDER BY  invcode desc";//查询累计邀请人数排名

            DataTable dtcode = DbHelperSQL.GET_DataTable_List(codesql);

            if (dtcode.Rows.Count > 0)
            {
                ViewBag.RenShu = dtcode;
            }
            else
            {
                ViewBag.RenShu = null;
            }

            string codesql2 = "SELECT TOP 5 (SELECT  t.mobile from hx_member_table t where t.registerid=a.registerid) mobile , SUM(Amt)amt FROM hx_UserAct a where RewTypeID = 1 AND Createtime >= '2017/1/6 00:00:00' AND Createtime <= '2017/3/31 23:59:59' AND  registerid IN(SELECT distinct Invpeopleid from hx_td_Userinvitation where invtime >= '2017/1/6 00:00:00' AND invtime <= '2017/3/31 23:59:59') GROUP BY registerid ORDER BY amt desc";//查询累计邀请返现排名

            DataTable dtcode2 = DbHelperSQL.GET_DataTable_List(codesql2);

            if (dtcode2.Rows.Count > 0)
            {
                ViewBag.JinE = dtcode2;
            }
            else
            {
                ViewBag.JinE = null;
            }
            return(View());
        }