예제 #1
0
파일: Score.aspx.cs 프로젝트: uvbs/mmp
 protected void Page_Load(object sender, EventArgs e)
 {
     uinfo = DataLoadTool.GetCurrUserModel();
     // txtScore.Text = uinfo.TotalScore.ToString();
     bllUserScore = new BLLJIMP.BLLUserScore(uinfo.UserID);
     UserLevel    = bllUserScore.GetUserLevelByTotalScore(uinfo.HistoryTotalScore);
 }
예제 #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            userModel = DataLoadTool.GetCurrUserModel();
            juBll     = new BLLJIMP.BLLJuActivity();
            //获取活动ID
            int jid = Convert.ToInt32(Request["jid"], 16);//由16进制转换

            pubjid          = Request["jid"];
            juActivityModel = juBll.GetJuActivity(jid);

            //判断权限
            if (this.userModel.UserType != 1)
            {
                if (juActivityModel.UserID != this.userModel.UserID)
                {
                    Response.Write("<script>alert('无权访问该贺卡!');</script>");
                    Response.End();
                    return;
                }
            }

            try
            {
                //获取活动报名数据
                signUpDataList = this.juBll.QueryJuActivitySignUpData(jid);
            }
            catch { }

            if (signUpDataList == null)
            {
                signUpDataList = new List <BLLJIMP.Model.ActivityDataInfo>();
            }
        }
        private static string websiteOwner;//设定该站点所有者

        public void ProcessRequest(HttpContext context)
        {
            websiteOwner = DataLoadTool.GetWebsiteInfoModel().WebsiteOwner;
            bll          = new BLLJIMP.BLLWeixin("");
            context.Response.ContentType = "text/plain";
            context.Response.Expires     = 0;
            string action = context.Request["Action"];
            string result = "false";

            switch (action)
            {
            case "Add":
                result = Add(context);
                break;

            case "Edit":
                result = Edit(context);
                break;

            case "Delete":
                result = Delete(context);
                break;

            case "Query":
                result = GetAllByAny(context);
                break;
            }
            context.Response.Write(result);
        }
예제 #4
0
        /// <summary>
        /// 根据条件获取数据
        /// </summary>
        private static string GetAllByAny(HttpContext context)
        {
            //if (!_isview)
            //{
            //    return null;
            //}

            int    pageIndex = Convert.ToInt32(context.Request["page"]);
            int    pageSize  = Convert.ToInt32(context.Request["rows"]);
            string keyWord   = context.Request["SearchTitle"];
            var    strWhere  = string.Format("UserID='{0}'", DataLoadTool.GetCurrUserID());

            //if (!string.IsNullOrEmpty(searchtitle))
            //{
            //    searchCondition += "UserID like '%" + searchtitle + "%'";
            //}

            List <ZentCloud.BLLJIMP.Model.WeixinMemberInfo> dataList = bll.GetLit <ZentCloud.BLLJIMP.Model.WeixinMemberInfo>(pageSize, pageIndex, strWhere, "RegDate ASC");

            int totalCount = bll.GetCount <ZentCloud.BLLJIMP.Model.WeixinMemberInfo>(strWhere);

            return(Common.JSONHelper.ObjectToJson(
                       new
            {
                total = totalCount,
                rows = dataList
            }));
        }
예제 #5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            currUser       = DataLoadTool.GetCurrUserModel();
            cateRootId     = Convert.ToInt32(Request["cateRootId"]);
            isNoPreSelect  = Convert.ToInt32(Request["isNoPreSelect"]);
            selectMaxDepth = Convert.ToInt32(Request["selectMaxDepth"]);
            if (selectMaxDepth.Equals(0))
            {
                selectMaxDepth = int.MaxValue;
            }
            isHide = bllMenupermission.CheckPerRelationByaccount(bllUser.GetCurrUserID(), -1);

            //是否传入了名称
            var inputShowName = Request["currShowName"];

            hasKeyValue = Request["hasKeyValue"];
            if (!string.IsNullOrWhiteSpace(inputShowName))
            {
                currShowName        = inputShowName;
                nCategoryTypeConfig = new ArticleCategoryTypeConfig();
                return;
            }

            //检查配置取名称
            CategoryType        = Request["type"];
            nCategoryTypeConfig = bllArticleCategory.GetArticleCategoryTypeConfig(bllArticleCategory.WebsiteOwner, CategoryType);
            if (nCategoryTypeConfig != null)
            {
                currShowName = nCategoryTypeConfig.CategoryTypeExDispalyName;
            }
            else
            {
                currShowName = "分类"; nCategoryTypeConfig = new ArticleCategoryTypeConfig();
            }
        }
예제 #6
0
        private static string websiteOwner;//设定该站点所有者

        public void ProcessRequest(HttpContext context)
        {
            websiteOwner = DataLoadTool.GetWebsiteInfoModel().WebsiteOwner;
            context.Response.ContentType = "text/plain";
            //BLLMenuPermission perbll = new BLLMenuPermission("");
            //_isedit = perbll.CheckUserAndPms(DataLoadTool.GetCurrUserID(), 258);
            //_isview = perbll.CheckUserAndPms(DataLoadTool.GetCurrUserID(), 253);

            bll = new BLLJIMP.BLL("");
            context.Response.ContentType = "text/plain";
            context.Response.Expires     = 0;
            string action = context.Request["Action"];
            string result = "false";

            switch (action)
            {
            case "Add":
                result = Add(context);
                break;

            case "Edit":
                result = Edit(context);
                break;

            case "Delete":
                result = Delete(context);
                break;

            case "Query":
                result = GetAllByAny(context);
                break;
            }
            context.Response.Write(result);
        }
예제 #7
0
        ///// <summary>
        /////发送短信
        ///// </summary>
        //private string SendSMS(HttpContext context)
        //{


        //    string PhoneList = context.Request["PhoneList"];
        //    //var SMSContent = context.Request["SMSContent"];
        //    //if (string.IsNullOrWhiteSpace(SMSContent))
        //    //{
        //    //    return "请输入短信内容";
        //    //}

        //    //var userInfo= DataLoadTool.GetCurrUserModel();
        //    //int count = 0;
        //    //foreach (var item in PhoneList.Split(','))
        //    //{
        //    //    string Parm = string.Format("userName={0}&userPwd={1}&mobile={2}&content={3}&pipeID=membertrigger", userInfo.UserID, userInfo.Password, item, SMSContent);
        //    //    Common.HttpInterFace obj = new Common.HttpInterFace();
        //    //    string result = obj.PostWebRequest(Parm, "http://www.jubit.org/Serv/SubmitSMSAPI.aspx", System.Text.Encoding.GetEncoding("gb2312"));
        //    //    if (result=="0")
        //    //    {
        //    //        count++;
        //    //    }
        //    //    else
        //    //    {

        //    //    }

        //    //}
        //    //if (PhoneList.Split(',').Length==count)
        //    //{
        //    //    return "true";
        //    //}
        //    //else
        //    //{
        //    //    return "短信未全部发送成功,请检查余额或联系管理员";
        //    //}

        //    //BLLMember bllMember = new BLLMember("");
        //    //context.Session[SessionKey.PageRedirect] = "/Activity/ActivityData.aspx";
        //    //context.Session[SessionKey.PageCacheName] = "cache" + bllMember.GetGUID(TransacType.CacheGet);
        //    //Comm.DataCache.SetCache(context.Session[SessionKey.PageCacheName].ToString(), PhoneList);

        //    return "true";

        //}

        /// <summary>
        /// 下载报名数据
        /// </summary>
        /// <param name="context"></param>
        /// <returns></returns>
        private void DownLoadActivityData(HttpContext context)
        {
            BLLPermission.BLLMenuPermission bllMenupermission = new BLLPermission.BLLMenuPermission("");
            bool isData = bllMenupermission.CheckPerRelationByaccount(bllUser.GetCurrUserID(), -1);

            if (isData)
            {
                return;
            }
            string activityId = context.Request["ActivityID"];
            string exportType = context.Request["type"];

            if (!bllActivity.IsExistActivity(activityId))
            {
                return;
            }
            ////判断普通用户是否有相应权限
            //if (!bll.CheckActivityIDAndUser(ActivityID, cu.UserID) && userInfo.UserType != 1)
            //    return;
            #region 日志模块

            if (exportType == "DistributionOffLine")
            {
                bllLog.Add(BLLJIMP.Enums.EnumLogType.DistributionOffLine, BLLJIMP.Enums.EnumLogTypeAction.Export, bllUser.GetCurrUserID(), "导出分销员审核数据");
            }
            else
            {
                bllLog.Add(BLLJIMP.Enums.EnumLogType.DistributionOffLine, BLLJIMP.Enums.EnumLogTypeAction.Export, bllUser.GetCurrUserID(), "导出活动报名数据");
            }
            #endregion
            DataTable dataTable = bllActivity.QueryActivityData(activityId);
            string    fileName  = bllActivity.GetActivityInfoByActivityID(activityId).ActivityName;
            DataLoadTool.ExportDataTable(dataTable, string.Format("{0}_{1}_data.xls", fileName, DateTime.Now.ToString()));
        }
예제 #8
0
        protected ZentCloud.BLLJIMP.Model.UserInfo currUserInfo; //当前登陆的用户
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            context.Response.Expires     = 0;
            string result = "false";

            this.currUserInfo = DataLoadTool.GetCurrUserModel();

            try
            {
                string action = context.Request["Action"];

                //利用反射找到未知的调用的方法
                if (!string.IsNullOrEmpty(action))
                {
                    MethodInfo method = this.GetType().GetMethod(action, BindingFlags.NonPublic | BindingFlags.Instance); //找到方法BindingFlags.NonPublic指定搜索非公有方法
                    result = Convert.ToString(method.Invoke(this, new[] { context }));                                    //调用方法
                }
                else
                {
                    resp.Status = 0;
                    resp.Msg    = "Action为空!";
                    result      = Common.JSONHelper.ObjectToJson(resp);
                }
            }
            catch (Exception ex)
            {
                resp.Status = -1;
                resp.Msg    = ex.Message;
                result      = Common.JSONHelper.ObjectToJson(resp);
            }
            context.Response.Write(result);
        }
예제 #9
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!DataLoadTool.CheckWanBangLogin())
     {
         Response.Redirect(string.Format("/App/WanBang/Wap/Login.aspx?redirecturl={0}", Request.FilePath));
     }
 }
예제 #10
0
        public void ProcessRequest(HttpContext context)
        {
            int lotteryId = int.Parse(context.Request["LotteryId"]);

            bllLog.Add(BLLJIMP.Enums.EnumLogType.Marketing, BLLJIMP.Enums.EnumLogTypeAction.Export, bllLog.GetCurrUserID(), "导出中奖名单");
            DataTable dt = bllLottery.QueryLotteryData(lotteryId);

            foreach (DataRow dr in dt.Rows)
            {
                UserInfo userInfo = bllUser.GetUserInfo(dr["UserID"].ToString());
                if (userInfo != null)
                {
                    if (string.IsNullOrEmpty(dr["姓名"].ToString()))
                    {
                        dr["姓名"] = userInfo.TrueName;
                    }
                    if (string.IsNullOrEmpty(dr["手机"].ToString()))
                    {
                        dr["手机"] = userInfo.Phone;
                    }
                }
            }
            dt.Columns.Remove("UserID");
            DataLoadTool.ExportDataTable(dt, string.Format("{0}_{1}data.xls", "中奖名单", DateTime.Now.ToString()));
        }
예제 #11
0
 protected void Page_Load(object sender, EventArgs e)
 {
     websiteInfo = DataLoadTool.GetWebsiteInfoModel();
     if (string.IsNullOrEmpty(websiteInfo.MallType))
     {
         websiteInfo.MallType = "0";
     }
     model     = bll.GetProduct(Request["pid"]);
     shareLink = Request.Url.AbsoluteUri;
     if (bll.GetWebsiteInfoModel().IsDistributionMall.Equals(1))
     {
         if (bll.IsLogin)
         {
             UserInfo CurrentUserInfo = bll.GetCurrentUserInfo();
             if (bll.IsWeiXinBrowser && (string.IsNullOrEmpty(CurrentUserInfo.WXNickname) || string.IsNullOrEmpty(CurrentUserInfo.WXHeadimgurl)))
             {
                 Session.Clear();
                 Response.Redirect(Request.Url.AbsoluteUri);
             }
             if (string.IsNullOrEmpty(Request["sid"]))
             {
                 shareLink = string.Format("http://{0}{1}?action=show&pid={2}&sid={3}", Request.Url.Host, Request.FilePath, Request["pid"], CurrentUserInfo.AutoID);
             }
             else
             {
                 ShareUserInfo = bllUser.GetUserInfoByAutoID(int.Parse(Request["sid"]));
             }
         }
         else
         {
             Response.Write("请用微信打开");
             Response.End();
         }
     }
 }
예제 #12
0
        /// <summary>
        /// 导出数据
        /// </summary>
        private void DownLoadForwardData(HttpContext context)
        {
            string mid = context.Request["Mid"];
            //string activityId = context.Request["activityID"];
            //string uId = context.Request["uid"];
            // activityId = bllActivity.Get<BLLJIMP.Model.JuActivityInfo>(" JuActivityID=" + activityId).SignUpActivityID;

            //
            DataTable dt = new DataTable();

            StringBuilder strSql = new StringBuilder();

            strSql.Append("SELECT  ");
            strSql.AppendFormat(" userInfo.TrueName as 转发人姓名,");
            strSql.AppendFormat(" userInfo.Phone as 转发人手机号码,");
            strSql.AppendFormat(" ActivityName as 活动名称,");
            strSql.AppendFormat(" ActivitySignUpCount as 报名人数,");
            strSql.AppendFormat(" DistinctOpenCount as IP,");
            strSql.AppendFormat(" OpenCount as PV,");
            strSql.AppendFormat(" UV as 微信阅读人数,");
            strSql.AppendFormat(" RealLink as 链接地址,");
            strSql.AppendFormat(" InsertDate as 创建时间");

            strSql.Append(" FROM ZCJ_MonitorLinkInfo left join ZCJ_UserInfo userInfo on LinkName=userInfo.UserId ");
            strSql.AppendFormat(" WHERE MonitorPlanID={0} ", mid);
            dt = ZentCloud.ZCBLLEngine.BLLBase.Query(strSql.ToString()).Tables[0];

            //
            DataLoadTool.ExportDataTable(dt, string.Format("{0}data.xls", "", DateTime.Now.ToString()));
        }
예제 #13
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (string.IsNullOrEmpty(Request["id"]))
     {
         Response.Write("无参数");
         Response.End();
         return;
     }
     model = bll.Get <WBBaseInfo>(string.Format("AutoID={0}", Request["id"]));
     if (model == null)
     {
         Response.Write("基地不存在");
         Response.End();
         return;
     }
     if (model.IsDisable.Equals(1))
     {
         Response.Write("此基地已经禁用,暂时不能查看");
         Response.End();
         return;
     }
     if (DataLoadTool.CheckWanBangLogin())
     {
         IsLogin = true;
         if (bll.GetCount <WBAttentionInfo>(string.Format("UserId='{0}' And AttentionAutoID={1} And AttentionType={2}", HttpContext.Current.Session[SessionKey.WanBangUserID].ToString(), model.AutoID, 0)) > 0)
         {
             IsAttention = true;
         }
     }
 }
예제 #14
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (DataLoadTool.GetCurrUserModel().UserType == 1)
     {
         IsManager = true;
     }
 }
예제 #15
0
파일: TutorList.aspx.cs 프로젝트: uvbs/mmp
        private void GetTutorCtype()
        {
            this.websiteOwner = DataLoadTool.GetWebsiteInfoModel().WebsiteOwner;

            List <BLLJIMP.Model.ArticleCategory> trades        = bll.GetList <BLLJIMP.Model.ArticleCategory>(string.Format(" CategoryType ='trade' AND WebsiteOwner='{0}'", this.websiteOwner));
            List <BLLJIMP.Model.ArticleCategory> Professionals = bll.GetList <BLLJIMP.Model.ArticleCategory>(string.Format(" CategoryType ='Professional' AND WebsiteOwner='{0}'", this.websiteOwner));

            if (trades != null)
            {
                foreach (BLLJIMP.Model.ArticleCategory item in trades)
                {
                    TutorStr += "<input type=\"checkbox\" class=\"checkinput\" value=\"" + item.AutoID + "\" id=\"Tutor" + item.AutoID + "\" name=\"cbtrade\">";
                    TutorStr += "<label class=\"checklabel wbtn wbtn_gary\" for=\"Tutor" + item.AutoID + "\"> ";
                    TutorStr += "<span class=\"title\">" + item.CategoryName + "</span><span class=\"wbtn wbtn_orange checkmark\"><span class=\"iconfont icon-yes2\">";
                    TutorStr += "</span></span></label>";
                }
            }

            if (Professionals != null)
            {
                foreach (BLLJIMP.Model.ArticleCategory item in Professionals)
                {
                    ProfessionalStr += "<input type=\"checkbox\" class=\"checkinput\" value=\"" + item.AutoID + "\"  id=\"Tutor" + item.AutoID + "\" name=\"cbprofessionals\">";
                    ProfessionalStr += "<label class=\"checklabel wbtn wbtn_gary\" for=\"Tutor" + item.AutoID + "\"> ";
                    ProfessionalStr += "<span class=\"title\">" + item.CategoryName + "</span><span class=\"wbtn wbtn_orange checkmark\"><span class=\"iconfont icon-yes2\">";
                    ProfessionalStr += "</span></span></label>";
                }
            }
        }
예제 #16
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string activityID = Request["ActivityID"];

            this.ViewState["ActivityID"] = activityID;
            activityInfo = new BLLActivity("").Get <ActivityInfo>(string.Format(" ActivityID = '{0}'", activityID));
            if (activityInfo == null)
            {
                Response.Write("<script>alert('活动不存在!')</script>");
                Response.End();
                return;
            }

            var userInfo = DataLoadTool.GetCurrUserModel();

            if (userInfo.UserType != 1)//普通用户
            {
                if (activityInfo.WebsiteOwner != userInfo.WebsiteOwner)
                {
                    //Response.Redirect("/FShare/ActivityManage.aspx");
                    Response.Write("<script>alert('无权访问该数据,请确认当前用户是否拥有该活动权限!')</script>");
                    Response.End();
                    return;
                }
            }
            //this.lbActivityName.Text = activityInfo.ActivityName;
            //Pms_JuActivity_Advanced = DataLoadTool.CheckCurrUserPms(PermissionKey.Pms_JuActivity_Advanced);
        }
예제 #17
0
파일: CardCode.aspx.cs 프로젝트: uvbs/mmp
        protected void Page_Load(object sender, EventArgs e)
        {
            if (bllMall.IsLogin)
            {
                UserInfo userInfo = DataLoadTool.GetCurrUserModel();
                QCode.Append(string.Format("编号:{0}", userInfo.AutoID));
                QCode.AppendFormat("姓名:{0}", userInfo.TrueName);
                QCode.AppendFormat("性别:");
                if (!string.IsNullOrEmpty(userInfo.Gender))
                {
                    if (userInfo.Gender.Equals("1"))
                    {
                        QCode.Append("男");
                    }
                    if (userInfo.Gender.Equals("0"))
                    {
                        QCode.Append("女");
                    }
                }

                QCode.AppendFormat("电话:{0}", userInfo.Phone);
                QCode.AppendFormat("Email:{0}", userInfo.Email);
                QCode.AppendFormat("地区:{0}", userInfo.AddressArea);
            }
            else
            {
                Response.Redirect(string.Format("/App/Cation/Wap/Login.aspx?redirecturl={0}", Request.FilePath));
            }
        }
예제 #18
0
        /// <summary>
        /// 根据条件获取数据
        /// </summary>
        private static string GetAllByAny(HttpContext context)
        {
            //if (!_isview)
            //{
            //    return null;
            //}

            int    pageIndex = Convert.ToInt32(context.Request["page"]);
            int    pageSize  = Convert.ToInt32(context.Request["rows"]);
            string keyWord   = context.Request["SearchTitle"];
            var    strWhere  = "";
            var    userinfo  = DataLoadTool.GetCurrUserModel();

            if (userinfo.UserType != 1)
            {
                strWhere = string.Format("UserID='{0}'", userinfo.UserID);
            }
            if (!string.IsNullOrEmpty(keyWord))
            {
                strWhere += " UserID like '%" + keyWord + "%'";
            }

            List <ZentCloud.BLLJIMP.Model.WeixinMsgDetails> list = bll.GetLit <ZentCloud.BLLJIMP.Model.WeixinMsgDetails>(pageSize, pageIndex, strWhere, "ReplyDate DESC");

            int totalCount = bll.GetCount <ZentCloud.BLLJIMP.Model.WeixinMsgDetails>(strWhere);

            return(Common.JSONHelper.ObjectToJson(
                       new
            {
                total = totalCount,
                rows = list
            }));
        }
예제 #19
0
        /// <summary>
        /// 结束项目
        /// </summary>
        /// <param name="context"></param>
        /// <returns></returns>
        public string EndProject(HttpContext context)
        {
            if (!DataLoadTool.CheckWanBangLogin())
            {
                resp.Msg = "请先登录";
                return(Common.JSONHelper.ObjectToJson(resp));
            }
            int autoId = int.Parse(context.Request["AutoID"]);

            WBProjectInfo model = bll.Get <WBProjectInfo>(string.Format("AutoID={0} And UserId='{1}'", autoId, HttpContext.Current.Session[SessionKey.WanBangUserID].ToString()));

            if (model == null)
            {
                resp.Msg = "无效项目";
                return(Common.JSONHelper.ObjectToJson(resp));
            }
            model.Status = 2;
            if (bll.Update(model))
            {
                resp.Status = 1;
            }
            else
            {
                resp.Msg = "操作失败";
            }
            return(Common.JSONHelper.ObjectToJson(resp));
        }
예제 #20
0
파일: UserPage.cs 프로젝트: uvbs/mmp
 protected override void OnInit(EventArgs e)
 {
     BLLJIMP.Model.UserInfo uinfo = DataLoadTool.GetCurrUserModel();
     if (string.IsNullOrEmpty(uinfo.TrueName) && string.IsNullOrEmpty(uinfo.Phone) && string.IsNullOrEmpty(uinfo.Email))
     {
         Response.Redirect("/WuBuHui/Member/Registration.aspx?from=" + Request.RawUrl);
     }
     base.OnInit(e);
 }
예제 #21
0
파일: SignUp.aspx.cs 프로젝트: uvbs/mmp
 protected void Page_Load(object sender, EventArgs e)
 {
     currUserInfo          = DataLoadTool.GetCurrUserModel();
     currWebSiteModel      = DataLoadTool.GetWebsiteInfoModel();
     currWebSiteOwnerModel = new BLLJIMP.BLLUser("").GetUserInfo(currWebSiteModel.WebsiteOwner);
     signUpLoginName       = Common.Base64Change.EncodeBase64ByUTF8(currWebSiteOwnerModel.UserID);
     signUploginPwd        = Common.DEncrypt.ZCEncrypt(currWebSiteOwnerModel.Password);
     GetPageActionType();
 }
예제 #22
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (bllMall.IsLogin)
     {
         AddressList = bllMall.GetConsigneeAddressList(DataLoadTool.GetCurrUserID());
     }
     else
     {
         Response.Redirect(string.Format("/App/Cation/Wap/Login.aspx?redirecturl={0}", Request.FilePath));
     }
 }
예제 #23
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (bllMall.IsLogin)
     {
         currentUserInfo = DataLoadTool.GetCurrUserModel();
     }
     else
     {
         Response.Redirect(string.Format("/App/Cation/Wap/Login.aspx?redirecturl={0}", Request.FilePath));
     }
 }
예제 #24
0
        public void ProcessRequest(HttpContext context)
        {
            string sDate = context.Request["start_date"];
            string eDate = context.Request["end_date"];

            DataTable dataTable = bllMall.QueryStatisticsData(sDate, eDate);

            DataLoadTool.ExportDataTable(dataTable, string.Format("{0}_{1}_data.xls", bllLog.GetWebsiteInfoModel().WebsiteName, DateTime.Now.ToString()));

            bllLog.Add(BLLJIMP.Enums.EnumLogType.DistributionOffLine, BLLJIMP.Enums.EnumLogTypeAction.Export, bllLog.GetCurrUserID(), "导出商城统计数据");
        }
예제 #25
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!DataLoadTool.CheckWanBangLogin())
     {
         Response.Redirect(string.Format("/App/WanBang/Wap/Login.aspx?redirecturl={0}", Request.Url.PathAndQuery));
     }
     if (HttpContext.Current.Session[SessionKey.WanBangUserType].ToString().Equals("0"))
     {
         Response.Write("<script>alert('只有企业用户可以访问');window.location.href='Index.aspx';</script>");
         Response.End();//只有企业能访问
     }
 }
예제 #26
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (bllMall.IsLogin)
     {
         ScoreTotalIn  = bllMall.GetScoreRecordTotalInOut(DataLoadTool.GetCurrUserID(), 1);
         ScoreTotalOut = bllMall.GetScoreRecordTotalInOut(DataLoadTool.GetCurrUserID(), 0);
     }
     else
     {
         Response.Redirect(string.Format("/App/Cation/Wap/Login.aspx?redirecturl={0}", Request.FilePath));
     }
 }
예제 #27
0
        /// <summary>
        /// 关注
        /// </summary>
        /// <param name="context"></param>
        /// <returns></returns>
        public string AddAttentionInfo(HttpContext context)
        {
            if (!DataLoadTool.CheckWanBangLogin())
            {
                resp.Msg = "请先登录";
                return(Common.JSONHelper.ObjectToJson(resp));
            }
            int    attentionAutoId = int.Parse(context.Request["AttentionAutoID"]);
            string attentionType   = context.Request["AttentionType"];

            if (bll.GetCount <WBAttentionInfo>(string.Format("UserId='{0}' And AttentionAutoID={1} And AttentionType={2}", HttpContext.Current.Session[SessionKey.WanBangUserID].ToString(), attentionAutoId, attentionType)) > 0)
            {
                resp.Msg = "已经关注过了";
                return(Common.JSONHelper.ObjectToJson(resp));
            }
            if (HttpContext.Current.Session[SessionKey.WanBangUserType].ToString().Equals(attentionType))
            {
                switch (int.Parse(attentionType))
                {
                case 0:
                    if (bll.Get <WBBaseInfo>(string.Format("AutoID={0}", attentionAutoId)).UserId.Equals(HttpContext.Current.Session[SessionKey.WanBangUserID].ToString()))
                    {
                        resp.Msg = "不能关注自己";
                        return(Common.JSONHelper.ObjectToJson(resp));
                    }
                    break;

                case 1:
                    if (bll.Get <WBCompanyInfo>(string.Format("AutoID={0}", attentionAutoId)).UserId.Equals(HttpContext.Current.Session[SessionKey.WanBangUserID].ToString()))
                    {
                        resp.Msg = "不能关注自己";
                        return(Common.JSONHelper.ObjectToJson(resp));
                    }
                    break;
                }
            }
            WBAttentionInfo model = new WBAttentionInfo();

            model.UserId          = HttpContext.Current.Session[SessionKey.WanBangUserID].ToString();
            model.AttentionAutoID = attentionAutoId;
            model.AttentionType   = int.Parse(attentionType);
            model.InsertDate      = DateTime.Now;
            if (bll.Add(model))
            {
                resp.Status = 1;
                resp.Msg    = "关注成功";
            }
            else
            {
                resp.Msg = "关注失败";
            }
            return(Common.JSONHelper.ObjectToJson(resp));
        }
예제 #28
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         Uid   = Request["UserId"];
         Url   = Request["from"];
         uinfo = DataLoadTool.GetCurrUserModel();
         if (!string.IsNullOrEmpty(uinfo.TrueName) && !string.IsNullOrEmpty(uinfo.Phone) && !string.IsNullOrEmpty(uinfo.Email) && !string.IsNullOrEmpty(uinfo.Company))
         {
             Response.Redirect("/WuBuHui/MyCenter/MyCenter.aspx");
         }
     }
 }
예제 #29
0
        private void GetCType()
        {
            this.websiteOwner = DataLoadTool.GetWebsiteInfoModel().WebsiteOwner;

            List <BLLJIMP.Model.ArticleCategory> acategorys = bll.GetList <BLLJIMP.Model.ArticleCategory>(string.Format(" CategoryType='word'AND WebsiteOwner='{0}'", this.websiteOwner));

            if (acategorys != null)
            {
                foreach (BLLJIMP.Model.ArticleCategory item in acategorys)
                {
                    DisussStr += "<li class=\"catli\" v=\"" + item.AutoID + "\"><a >" + item.CategoryName + "</a></li>";
                }
            }
        }
예제 #30
0
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         UserInfo        = DataLoadTool.GetCurrUserModel();
         VoteInfo        = bllVote.GetVoteInfo(int.Parse(Request["vid"]));
         CanUseVoteCount = bllVote.GetCanUseVoteCount(VoteInfo.AutoID, DataLoadTool.GetCurrUserID());
         RechargeList    = bllVote.GetVoteRechargeList(VoteInfo.AutoID);
     }
     catch (Exception)
     {
         Response.End();
     }
 }