예제 #1
0
        /// <summary>
        /// 是否满足发送站内短信的条件
        /// </summary>
        /// <param name="LoginName"></param>
        /// <param name="NoticeType">通知</param>
        /// <returns></returns>
        public string IsSite(string LoginName, string NoticeType)
        {
            DataTable dt = dalConn.GetList("UserParametersTab", NoticeType + ",MobileCount", "parID", 1, 1, 0, 1, "LoginName='" + LoginName + "'");

            if (dt.Rows.Count > 0)
            {
                string notice = dt.Rows[0][NoticeType].ToString().Trim();

                if (notice != "")//有设置通知方式
                {
                    string[] s = notice.Split('|');
                    if (s[0].Trim() != "")//设置有站内短信方式
                    {
                        return("siteMsg");
                    }
                    else
                    {
                        return("");
                    }
                }
                else
                {
                    return("");
                }
            }
            else
            {
                return("");
            }
        }
예제 #2
0
    //获取区域
    protected string GetQu(object obj)
    {
        string str        = "";
        long   CurrPage   = Convert.ToInt64(ViewState["CurrPage"]);
        long   TotalCount = 0;
        long   infoId     = Convert.ToInt64(obj);

        Tz888.BLL.Conn dal = new Tz888.BLL.Conn();
        DataTable      dt  = dal.GetList("MerchantInfoTab", "infoId", "industryClassList,countrycode,Provinceid,cityid,countyid", "InfoId='" + infoId + "'", "InfoId desc", ref CurrPage, 1, ref TotalCount);

        if (dt.Rows.Count > 0)
        {
            DataTable dtPro  = dal.GetList("setProvincetab", "provinceid", "provinceid,provincename", "provinceid='" + dt.Rows[0]["provinceid"].ToString().Trim() + "'", "provinceid desc", ref CurrPage, 1, ref TotalCount);
            DataTable dtcity = dal.GetList("setcitytab", "cityid", "cityid,cityname", "cityid='" + dt.Rows[0]["cityid"].ToString().Trim() + "'", "cityid desc", ref CurrPage, 1, ref TotalCount);
            if (dtPro.Rows[0]["provincename"].ToString() != "")
            {
                str += dtPro.Rows[0]["ProvinceName"].ToString() + "省&nbsp;";
                if (dtcity.Rows[0]["CityName"].ToString() != "")
                {
                    str += dtcity.Rows[0]["CityName"].ToString() + "市";
                }
            }
            else
            {
                str += "<font color='red'>暂无投资区域</font>";
            }
        }
        else
        {
            str += "<font color='red'>暂无投资区域</font>";
        }
        return(str);
    }
예제 #3
0
    public string dgGetFocuseMe()
    {
        StringWriter   wr     = new StringWriter();
        HtmlTextWriter writer = new HtmlTextWriter(wr);
        StringBuilder  sb     = new StringBuilder();
        //读取用户的身份信息
        string LoginName = Tz888.BLL.Login.LoginInfoBLL.GetCookieContentByCookieType(0);

        if (LoginName.Trim() != "")
        {
            Tz888.BLL.Conn bllComm  = new Tz888.BLL.Conn();
            DataTable      dt       = new DataTable();
            long           CurrPage = 1;
            long           AllCount = 0;
            dt = bllComm.GetList("innerinfocontactTab", "loginName", "*", "ContactName='" + LoginName + "' and groupid = 1", "ContactID", ref CurrPage, 4, ref AllCount);
            if (AllCount > 0)
            {
                sb.Append("<div class='notemsg1'>共有<a href='/helper/InfoCollection.aspx' class='chenglink'><span id='focusme'>" + AllCount.ToString() + "</span></a> 位用户将您添加为好友</div>");
            }
            else
            {
                sb.Append("<div class='notemsg1'>没有新用户将您添加为好友!</div>");
            }


            sb.Append("<table width=100% border=0 cellpadding=0 cellspacing=0 class='none'>");

            Tz888.BLL.Register.MemberInfoBLL member = new Tz888.BLL.Register.MemberInfoBLL();
            sb.Append("<tr>");
            string tdName = "";
            if (dt.Rows.Count > 0)
            {
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    DataTable dtMember = bllComm.GetList("LoginInfoTAB", "*", "LoginName", 1, 1, 0, 1, "LoginName='" + dt.Rows[i]["loginName"].ToString().Trim() + "'");
                    string    headImg  = "";
                    //if (modelMem.HeadPortrait != "")
                    //    headImg = "http://images.topfo.com/" + modelMem.HeadPortrait;
                    //else
                    headImg = "../images/MemberData/nopic.gif";

                    sb.Append("<td width=28%><a target='_blank' href='/Register/MemberMessage_P.aspx?LoginName=" + dtMember.Rows[0]["LoginName"].ToString() + "'><img src='" + headImg + "' border='0' width='50' height='50' /></a></td>");
                    tdName += "<td><a target='_blank' href='/Register/MemberMessage_P.aspx?LoginName=" + dtMember.Rows[0]["LoginName"].ToString() + "'>" + dtMember.Rows[0]["NickName"].ToString() + "</a></td>";
                }
            }
            sb.Append("</tr><tr>");
            sb.Append(tdName);
            sb.Append("</tr></table>");
            sb.Append("<div class='entermail'><a href='helper/FriendManager/FriendAttention.aspx'  class='blue'>&gt;&gt;进入我的关注信息</a></div></div>");
        }
        return(sb.ToString());
    }
예제 #4
0
    private void SetTopInfo()
    {
        //string name = "liulixing";
        string name = "tz888admin";
        // string name = Page.User.Identity.Name;
        DataTable dtUser = dal.GetList("LoginInfoTab", "NickName,ManageTypeID,MemberGradeID", "LoginId", 1, 1, 0, 1, "LoginName='" + name + "'");

        if (!string.IsNullOrEmpty(dtUser.Rows[0]["NickName"].ToString()))
        {
            lblUserName.Text = dtUser.Rows[0]["NickName"].ToString();
        }
        else
        {
            lblUserName.Text = name.Trim();
        }

        DataTable dt = new DataTable();

        Tz888.BLL.Login.LoginInfoBLL bllLoginInfo = new Tz888.BLL.Login.LoginInfoBLL();
        dt = bllLoginInfo.GetLoginInfoByLoginName(name.Trim());
        try
        {
            if (dt != null && dt.Rows.Count > 0)
            {
                lblInfoCount.Text   = "(" + dt.Rows[0]["TodayInfoCount"].ToString().Trim() + ")";
                lblMemberCount.Text = "(" + dt.Rows[0]["TodayMemberCount"].ToString().Trim() + ")";
            }
        }
        catch { }
    }
예제 #5
0
    private void SetTopInfo()
    {
        DataTable dtUser = dal.GetList("LoginInfoTab", "NickName,ManageTypeID,MemberGradeID", "LoginId", 1, 1, 0, 1, "LoginName='262734254'");

        if (!string.IsNullOrEmpty(dtUser.Rows[0]["NickName"].ToString()))
        {
            lblUserName.Text = dtUser.Rows[0]["NickName"].ToString();
        }
        else
        {
            lblUserName.Text = Page.User.Identity.Name.Trim();
        }

        //try
        //{
        //    if (!string.IsNullOrEmpty(dtUser.Rows[0]["NickName"].ToString()))
        //    {
        //        lblUserName.Text = dtUser.Rows[0]["NickName"].ToString();
        //    }
        //    else { lblUserName.Text = Page.User.Identity.Name.Trim(); }

        //    if (dtUser.Rows[0]["MemberGradeID"].ToString() == "1")
        //    {
        //        lblMemberGrade.Text = "拓富通试用会员";
        //    }
        //    //else
        //    //{
        //    //    lblMemberGrade.Text = "拓富通会员";
        //    //    if (memgrade == "3")
        //    //    {
        //    //        lblMemberGrade.Text = "拓富通银牌会员";
        //    //    }
        //    //    if (memgrade == "4")
        //    //    {
        //    //        lblMemberGrade.Text = "拓富通金牌会员";
        //    //    }
        //    //    if (memgrade == "5")
        //    //    {
        //    //        lblMemberGrade.Text = "拓富通钻石会员";
        //    //    }

        //    //}
        //}
        //catch { lblUserName.Text = Page.User.Identity.Name.Trim(); }
        DataTable dt = new DataTable();

        Tz888.BLL.Login.LoginInfoBLL bllLoginInfo = new Tz888.BLL.Login.LoginInfoBLL();
        dt = bllLoginInfo.GetLoginInfoByLoginName("262734254");
        try
        {
            if (dt != null && dt.Rows.Count > 0)
            {
                lblInfoCount.Text   = "(" + dt.Rows[0]["TodayInfoCount"].ToString().Trim() + ")";
                lblMemberCount.Text = "(" + dt.Rows[0]["TodayMemberCount"].ToString().Trim() + ")";
            }
        }
        catch { }
    }
예제 #6
0
        //添加好友
        public void AddFriend(Tz888.Model.GoodFriend model)
        {
            dal.AddFriend(model);
            SendNotice obj = new SendNotice();
            Conn       con = new Conn();
            DataTable  dt1 = con.GetList("LoginInfoTab", "NickName", "LoginID", 1, 1, 0, 1, "LoginName='" + model.LoginName + "'");
            DataTable  dt2 = con.GetList("LoginInfoTab", "NickName", "LoginID", 1, 1, 0, 1, "LoginName='" + model.ContactName + "'");

            if (dt1.Rows.Count > 0 && dt2.Rows.Count > 0)
            {
                string loginname1 = dt1.Rows[0]["NickName"].ToString().Trim(); //添加人
                string loginname2 = dt2.Rows[0]["NickName"].ToString().Trim(); //被添加人
                string MobileText = "您已被“" + loginname1 + "”添加为好友,[此条信息免费]";
                string EmailText  = "尊敬的" + loginname2 + ",您已被“" + loginname1 + "”添加为好友";
                string Title      = "好友添加通知";
                string SiteText   = "您已被“" + loginname1 + "”添加为好友,[此条信息免费]";
                obj.SendSms(model.ContactName, MobileText, Title, SiteText, EmailText, "FriendAddNotice");
            }
        }
예제 #7
0
    /// <summary>
    /// 有效期
    /// </summary>
    private void SetValid()
    {
        Tz888.BLL.Conn dal = new Tz888.BLL.Conn();
        DataTable      dt  = dal.GetList("dicttab", "*", "idictvalue", 10, 1, 0, 0, " cdicttype='xmyxqxx' ");

        this.rdlValiditeTerm.DataTextField  = "cdictname";
        this.rdlValiditeTerm.DataValueField = "idictvalue";
        this.rdlValiditeTerm.DataSource     = dt;
        this.rdlValiditeTerm.DataBind();
    }
예제 #8
0
        /// <summary>
        /// 根据ID取出BID ServicesVIW
        /// </summary>
        /// <param name="ID"></param>
        /// <returns></returns>
        public string GetServiesMID(int ID)
        {
            Conn      dal = new Conn();
            DataTable dt  = dal.GetList("ServicesVIW", "sid,lvl", "id", 1, 1, 0, 1, "lvl=1 and ID=" + ID);
            string    mid = "";

            if (dt.Rows.Count > 0)
            {
                mid = dt.Rows[0]["sid"].ToString();
            }
            return(mid);
        }
예제 #9
0
        public string GegBID(int MID)
        {
            Conn      dal = new Conn();
            DataTable dt  = dal.GetList("ServicesMViw", "ServiesBID", "ServiesMID", 1, 1, 0, 1, "ServiesMID=" + MID);

            if (dt.Rows.Count > 0)
            {
                return(dt.Rows[0]["ServiesBID"].ToString());
            }
            else
            {
                return("");
            }
        }
예제 #10
0
        /// <summary>
        /// 根据小类ID取得大类Name
        /// </summary>
        /// <param name="MID"></param>
        /// <returns></returns>
        public string GetBNameByMID(int MID)
        {
            Conn      dal = new Conn();
            DataTable dt  = dal.GetList("setServiesbigtab", "ServiesbName", "ServiesBID", 1, 1, 0, 1, "ServiesBID=(select ServiesBID from setServiessmalltab where ServiesMID=" + MID + ")");

            if (dt.Rows.Count > 0)
            {
                return(dt.Rows[0]["ServiesbName"].ToString());
            }
            else
            {
                return("");
            }
        }
예제 #11
0
        /// <summary>
        /// 根据SID 取得NAME
        /// </summary>
        /// <param name="SID"></param>
        /// <returns></returns>
        public string GetNameBySID(int SID)
        {
            Conn      dal = new Conn();
            DataTable dt  = dal.GetList("ServicesVIW", "ServiesName", "ID", 1, 1, 0, 1, "SID=" + SID);

            if (dt.Rows.Count > 0)
            {
                return(dt.Rows[0]["ServiesName"].ToString());
            }
            else
            {
                return("");
            }
        }
예제 #12
0
        /// <summary>
        /// 根据名称获取SID
        /// </summary>
        /// <param name="ServiesName"></param>
        /// <returns></returns>
        public string GetSIDByName(string ServiesName, int lv)
        {
            Conn      dal = new Conn();
            DataTable dt  = dal.GetList("ServicesVIW", "SID", "ID", 1, 1, 0, 1, "ServiesName='" + ServiesName + "' and lvl=" + lv);

            if (dt.Rows.Count > 0)
            {
                return(dt.Rows[0]["SID"].ToString());
            }
            else
            {
                return("");
            }
        }
예제 #13
0
        /// <summary>
        /// 服务二级分类名称
        /// </summary>
        /// <returns></returns>
        public string GetServiesMNameByID(int ServiesMID)
        {
            Conn      dal = new Conn();
            DataTable dt  = dal.GetList("setServiesSmallTab", "ServiesMName", "ServiesMID", 1, 1, 0, 1, "ServiesMID=" + ServiesMID);

            if (dt.Rows.Count > 0)
            {
                return(dt.Rows[0]["ServiesMName"].ToString());
            }
            else
            {
                return("");
            }
        }
예제 #14
0
        public string isAsk(string LoginName)
        {
            Conn      dal = new Conn();
            DataTable dt  = dal.GetList("paypwdtab", "loginname,question,answer", "QID", 1, 1, 0, 1, "LoginName='" + LoginName + "'");

            if (dt.Rows.Count > 0)
            {
                return(dt.Rows[0]["question"].ToString());
            }
            else
            {
                return("");
            }
        }
예제 #15
0
    //获取行业
    protected string GetIndustry(object obj)
    {
        string str        = "";
        string message    = "";
        long   CurrPage   = Convert.ToInt64(ViewState["CurrPage"]);
        long   TotalCount = 0;
        long   infoId     = Convert.ToInt64(obj);

        Tz888.BLL.Conn dal = new Tz888.BLL.Conn();
        DataTable      dt  = dal.GetList("MerchantInfoTab", "infoId", "industryClassList,countrycode,Provinceid,cityid,countyid", "InfoId='" + infoId + "'", "InfoId desc", ref CurrPage, 1, ref TotalCount);

        if (dt.Rows.Count > 0)
        {
            string[] industryClassList = dt.Rows[0]["industryClassList"].ToString().Split(new char[] { ',' });
            for (int i = 0; i < industryClassList.Length; i++)
            {
                DataTable dt1 = dal.GetList("SetIndustryBTab", "sort", "industryBid,industryBname", "industryBid='" + industryClassList[i].Trim() + "'", "sort desc", ref CurrPage, 1, ref TotalCount);
                if (dt1.Rows.Count > 0)
                {
                    str += dt1.Rows[0]["industryBname"].ToString() + ",";
                }
            }
            if (str.Length == 0)
            {
                message = "<font color='red'>暂无行业</font>";
            }
            if (str.EndsWith(","))
            {
                message = str.Substring(0, str.Length - 1);
            }
        }
        else
        {
            message = "<font color='red'>暂无行业</font>";
        }
        return(message);
    }
    private void databind()
    {
        ddlServiceType.DataSource     = bll.GetTypeAll();
        ddlServiceType.DataTextField  = "typeName";
        ddlServiceType.DataValueField = "typeId";
        ddlServiceType.DataBind();

        Tz888.BLL.Conn dal = new Tz888.BLL.Conn();
        DataTable      dt  = dal.GetList("dicttab", "*", "idictvalue", 10, 1, 0, 0, " cdicttype='xmyxqxx' ");

        this.rdlValiditeTerm.DataTextField  = "cdictname";
        this.rdlValiditeTerm.DataValueField = "idictvalue";
        this.rdlValiditeTerm.DataSource     = dt;
        this.rdlValiditeTerm.DataBind();
    }
예제 #17
0
    public void bind()
    {
        Tz888.BLL.Conn dal        = new Tz888.BLL.Conn();
        long           CurrPage   = Convert.ToInt64(ViewState["CurrPage"]);
        long           TotalCount = 0;
        DataTable      dt         = dal.GetList("SubscribeRecViw", "ID", "*", " PromotionStatu=1 and ReceiveLoginName='" + loginname + "'", "ID desc", ref CurrPage, 15, ref TotalCount);

        lblCount.Text     = TotalCount.ToString();
        lblPageCount.Text = System.Math.Ceiling(Convert.ToDouble(TotalCount) / Convert.ToDouble(15)).ToString();
        lblCurrPage.Text  = CurrPage.ToString();
        txtPage.Value     = CurrPage.ToString();
        lblCount.Text     = TotalCount.ToString();
        Pager();
        myList.DataSource = dt;
        myList.DataBind();
    }
예제 #18
0
        /// <summary>
        /// �Ƿ�������֧������
        /// </summary>
        /// <param name="LoginName"></param>
        /// <returns></returns>
        public bool isSetPwd(string LoginName)
        {
            Conn      dal = new Conn();
            DataTable dt  = dal.GetList("PayPwdTab", "PayPassword", "QID", 1, 1, 0, 1, "LoginName='" + LoginName + "'");

            if (dt.Rows.Count > 0)
            {
                if (dt.Rows[0]["PayPassword"].ToString() != "" || dt.Rows[0]["PayPassword"] != null || dt.Rows[0]["PayPassword"].ToString() != null)
                {
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
            else
            {
                return(false);
            }
        }
예제 #19
0
    private void databind()
    {
        ddlServiceType.DataSource     = bll.GetTypeAll();
        ddlServiceType.DataTextField  = "typeName";
        ddlServiceType.DataValueField = "typeId";
        ddlServiceType.DataBind();

        Tz888.BLL.Conn dal = new Tz888.BLL.Conn();
        DataTable      dt  = dal.GetList("dicttab", "*", "idictvalue", 10, 1, 0, 0, " cdicttype='xmyxqxx' ");

        this.rdlValiditeTerm.DataTextField  = "cdictname";
        this.rdlValiditeTerm.DataValueField = "idictvalue";
        this.rdlValiditeTerm.DataSource     = dt;
        this.rdlValiditeTerm.DataBind();

        //机构类别
        ProfessionalTalentsType orgBll = new ProfessionalTalentsType();

        this.DropIndustry.DataSource     = orgBll.GetList("");
        this.DropIndustry.DataTextField  = "TypeName";
        this.DropIndustry.DataValueField = "typeid";
        this.DropIndustry.DataBind();
    }
예제 #20
0
    private void DoLogin()
    {
        int AuthenticationTickeTime = Convert.ToInt32(Common.GetAuthenticationTickeTime());

        #region //会员登录


        //验证用户名与密码是否正确
        int          ErrorID   = 0;
        string       ErrorMsg  = "";
        LoginInfoBLL loginRule = new LoginInfoBLL();
        DataTable    dt        = new DataTable();

        dt = loginRule.LmAuthenticate(
            strLoginName,
            0,

            false,
            ref ErrorID,
            ref ErrorMsg);

        if (ErrorID != 0)
        {
            Response.Write("<script>alert('用户名或密码错误!');location.href='http://member.topfo.com/login.aspx';</script>");
            return;
        }
        if (dt.Rows.Count > 0)
        {
            strRoleName = dt.Rows[0]["RoleName"].ToString().Trim();
        }
        if ((dt.Rows.Count > 0) && (strRoleName == "0")) //
        {
            InsertLoginLog(strLoginName, strRoleName);
            //写登陆cookie开始
            HttpCookie loginedUser = new HttpCookie("loginedUser");
            loginedUser.Expires = DateTime.Now.AddDays(1);
            loginedUser.Value   = strLoginName;

            Response.Cookies.Add(loginedUser);
            //写登陆cookie结束
            Tz888.BLL.Login.LoginInfoBLL.Logout();


            //分配验证票,同时建立角色信息
            LoginInfoBLL.SetUserFormsCookie(strLoginName, dt.Rows[0]["MemberGradeID"].ToString().Trim(), dt.Rows[0]["ManageTypeID"].ToString().Trim(), true);
            #region  登录后SESSION记录 用户名,用户角色以及 角色组
            Tz888.BLL.Conn dal        = new Tz888.BLL.Conn();
            DataTable      dtUser     = dal.GetList("VipApplyTab", "BuyTerm", "ApplyID", 1, 1, 0, 1, "LoginName='" + strLoginName + "'");
            string         MemberType = "";
            if (dtUser != null && dtUser.Rows.Count > 0)
            {
                MemberType = dtUser.Rows[0]["BuyTerm"].ToString();
            }
            else
            {
                MemberType = "1";
            }

            string[] obj = { strLoginName, dt.Rows[0]["ManageTypeID"].ToString().Trim(), MemberType };

            Session["MemberObj"] = obj;

            #endregion

            if (!(HttpContext.Current.User == null))
            {
                if (HttpContext.Current.User.Identity.AuthenticationType == "Forms")
                {
                    System.Web.Security.FormsIdentity id;
                    id = (System.Web.Security.FormsIdentity)HttpContext.Current.User.Identity;
                    String[] myRoles = new String[6];
                    myRoles[0] = "2001";
                    myRoles[1] = "2002";
                    myRoles[2] = "2003";
                    myRoles[3] = "2004";
                    myRoles[4] = "2006";
                    myRoles[5] = "2007";

                    HttpContext.Current.User = new System.Security.Principal.GenericPrincipal(id, myRoles);
                }
            }
            //此为搭建的互告环境 20100330
            HttpCookie Cook = new HttpCookie("uID");
            Cook.Value  = dt.Rows[0]["loginId"].ToString();
            Cook.Domain = ".topfo.com";

            Response.SetCookie(Cook);

            #region 获取跳转链接并跳转



            if (this.ViewState["ReturnURL"] != null)
            {
                Response.Redirect(this.ViewState["ReturnURL"].ToString().Trim());
            }
            else
            {
                if (dt.Rows[0]["MemberGradeID"].ToString().Trim() == "1002")
                {
                    //拓富会员
                    Response.Redirect("indexTof.aspx");
                }
                else
                {
                    //普通会员
                    Response.Redirect("index.aspx");
                }
            }

            #endregion
        }
        else
        {
            if (dt.Rows.Count == 0)
            {
                Response.Write("<script>alert('用户名或密码错误!');location.href='http://member.topfo.com/login.aspx';</script>");
            }
        }

        #endregion
    }
예제 #21
0
    /// <summary>
    /// 判断发送消息的类型
    /// </summary>
    /// <param name="dal">业务层</param>
    /// <param name="descript">发送内容</param>
    /// <param name="htmlFile">显示的地址</param>
    /// <param name="CurrPage">当前页</param>
    /// <param name="TotalCount">总记录数</param>
    /// <param name="Promotioncount">推广的数量</param>
    /// <param name="SubscribeType">推广的类型</param>
    /// <param name="strWhere">推广的条件</param>
    /// <param name="countTatol">推广提取的条数</param>
    private void SendSummey(Tz888.BLL.Conn dal, string descript, string htmlFile, ref long CurrPage, ref long TotalCount, string[] Promotioncount, string[] SubscribeType, ref string strWhere, ref int countTatol)
    {
        string type = "";

        Tz888.BLL.SubscribeSet bll = new Tz888.BLL.SubscribeSet();
        for (int j = 0; j < SubscribeType.Length - 1; j++)
        {
            if (SubscribeType[j].Equals("1") && SubscribeType[j] != "") //判断是属于哪个类型(站内短信)
            {
                if (Promotioncount[j] != "")
                {
                    countTatol = Convert.ToInt32(Promotioncount[j]);  //得到哪种类型下的推广数量
                    DataTable dt = dal.GetList("showLoginMember_getList", "loginID", "*", strWhere, "NEWID()", ref CurrPage, countTatol, ref TotalCount);
                    if (dt != null)
                    {
                        if (dt.Rows.Count > 0)
                        {
                            if (countTatol <= dt.Rows.Count)
                            {
                                SendLoginNameShort(descript, dt);
                                //执行成功之后更改推广类型,是为了避免下次再次发信息

                                site = true;
                                if (email && phone)//最后一次

                                {
                                    type = ",,,";
                                }
                                else if (email)//第二次

                                {
                                    type = ",,3,";
                                }
                                else if (phone)
                                {
                                    type = ",2,,";
                                }
                                else
                                {
                                    type = SubType.Substring(SubType.IndexOf(","));
                                }
                                bll.Update(id, type);
                                type = "";
                            }
                        }
                    }
                }
            }
            if (SubscribeType[j].Equals("2") && SubscribeType[j] != "") //判断是属于哪个类型(Email)
            {
                if (Promotioncount[j] != "")
                {
                    countTatol = Convert.ToInt32(Promotioncount[j]); //得到哪种类型下的推广数量
                    DataTable dt = dal.GetList("showLoginMember_getList", "loginID", "*", strWhere, "NEWID()", ref CurrPage, countTatol, ref TotalCount);
                    if (dt != null)
                    {
                        if (dt.Rows.Count > 0)
                        {
                            if (countTatol <= dt.Rows.Count)
                            {
                                SendEmailShort(descript, htmlFile, dt);
                                email = true;
                                if (site && phone) //最后一次

                                {
                                    type = ",,,";
                                }
                                else if (site)//如果是第二次
                                {
                                    type = ",,3,";
                                }
                                else if (phone)
                                {
                                    type = "1,,,";
                                }
                                else //第一次

                                {    //1,,3,
                                    type = SubType.Substring(0, SubType.IndexOf("2")) + SubType.Substring(SubType.IndexOf("2") + 1, 2);
                                }
                                bll.Update(id, type);
                                type = "";
                            }
                        }
                    }
                }
            }
            if (SubscribeType[j].Equals("3") && SubscribeType[j] != "") //判断是属于哪个类型(phone)
            {
                if (Promotioncount[j] != "")
                {
                    countTatol = Convert.ToInt32(Promotioncount[j]); //得到哪种类型下的推广数量
                    DataTable dt = dal.GetList("showLoginMember_getList", "loginID", "*", strWhere, "NEWID()", ref CurrPage, countTatol, ref TotalCount);
                    if (dt != null)
                    {
                        if (dt.Rows.Count > 0)
                        {
                            if (countTatol <= dt.Rows.Count)
                            {
                                SendPhoneShort(descript, dt);
                                phone = true;
                                if (site && email) //在本次循环中是最后一次执行

                                {
                                    type = ",,,";
                                }
                                else if (site)  //在本次循环中是第二次执行
                                {
                                    type = ",2,,";
                                }
                                else if (email)
                                {
                                    type = "1,,,";
                                }
                                else
                                {
                                    type = SubType.Substring(0, SubType.IndexOf("3")) + ",";
                                }
                                bll.Update(id, type);
                                type = "";
                            }
                        }
                    }
                }
            }
        }
        PromotionType();
        strWhere = "";
        strWhere = ViewState["strWhere"].ToString();
    }
예제 #22
0
    private void DoLogin()
    {
        int AuthenticationTickeTime = Convert.ToInt32(Common.GetAuthenticationTickeTime());

        #region //会员登录
        lblValidate.Visible = false;

        //验证用户名与密码是否正确
        int          ErrorID   = 0;
        string       ErrorMsg  = "";
        LoginInfoBLL loginRule = new LoginInfoBLL();
        DataTable    dt        = new DataTable();

        dt = loginRule.Authenticate(
            strLoginName,
            0,
            strPassword,
            false,
            ref ErrorID,
            ref ErrorMsg);

        if (ErrorID != 0)
        {
            lblPasswordWrong.Text    = ErrorMsg;
            lblPasswordWrong.Visible = true;
            return;
        }
        if (dt.Rows.Count > 0)
        {
            strRoleName = dt.Rows[0]["RoleName"].ToString().Trim();
        }
        if ((dt.Rows.Count > 0) && (strRoleName == "0")) //
        {
            InsertLoginLog(strLoginName, strRoleName);
            //写登陆cookie开始
            HttpCookie loginedUser = new HttpCookie("loginedUser");
            loginedUser.Expires = DateTime.Now.AddDays(1);
            loginedUser.Value   = strLoginName;

            Response.Cookies.Add(loginedUser);
            //写登陆cookie结束
            Tz888.BLL.Login.LoginInfoBLL.Logout();


            //BBS登录
            Tz888DZLogin.BBSLogin(dt.Rows[0]["NickName"].ToString().Trim(), txtPsd.Text.Trim(), dt.Rows[0]["email"].ToString().Trim());
            //分配验证票,同时建立角色信息
            LoginInfoBLL.SetUserFormsCookie(strLoginName, dt.Rows[0]["MemberGradeID"].ToString().Trim(), dt.Rows[0]["ManageTypeID"].ToString().Trim(), true);
            #region  登录后SESSION记录 用户名,用户角色以及 角色组
            Tz888.BLL.Conn dal        = new Tz888.BLL.Conn();
            DataTable      dtUser     = dal.GetList("VipApplyTab", "BuyTerm", "ApplyID", 1, 1, 0, 1, "LoginName='" + strLoginName + "'");
            string         MemberType = "";
            if (dtUser != null && dtUser.Rows.Count > 0)
            {
                MemberType = dtUser.Rows[0]["BuyTerm"].ToString();
            }
            else
            {
                MemberType = "1";
            }

            string[] obj = { strLoginName, dt.Rows[0]["ManageTypeID"].ToString().Trim(), MemberType };

            Session["MemberObj"] = obj;

            #endregion

            if (!(HttpContext.Current.User == null))
            {
                if (HttpContext.Current.User.Identity.AuthenticationType == "Forms")
                {
                    System.Web.Security.FormsIdentity id;
                    id = (System.Web.Security.FormsIdentity)HttpContext.Current.User.Identity;
                    String[] myRoles = new String[6];
                    myRoles[0] = "2001";
                    myRoles[1] = "2002";
                    myRoles[2] = "2003";
                    myRoles[3] = "2004";
                    myRoles[4] = "2006";
                    myRoles[5] = "2007";

                    HttpContext.Current.User = new System.Security.Principal.GenericPrincipal(id, myRoles);
                }
            }

            HttpCookie Cook = new HttpCookie("uID");
            Cook.Value  = dt.Rows[0]["loginId"].ToString();
            Cook.Domain = ".topfo.com";

            Response.SetCookie(Cook);

            #region 获取跳转链接并跳转
            string strReturnURL = System.Web.HttpUtility.UrlDecode(Request.Params["ReturnURL"]);
            string strurl       = "Index.aspx";
            if (Request.QueryString["url"] != null)
            {
                strurl = Request.QueryString["url"].ToString();
            }
            string strSimpleRetrun = Request.Params["Simple"];

            if (action == "bbs")
            {
                Response.Redirect(System.Configuration.ConfigurationManager.AppSettings["BBS_weburl"]);
            }
            if (strReturnURL != null)
            {
                Response.Redirect(strReturnURL);
            }
            else if (strurl != null)
            {
                Response.Redirect(strurl);
            }
            else
            {
                if (this.ViewState["ReturnURL"] != null)
                {
                    Response.Redirect(this.ViewState["ReturnURL"].ToString().Trim());
                }
                else
                {
                    if (dt.Rows[0]["MemberGradeID"].ToString().Trim() == "1002")
                    {
                        //拓富会员
                        //Response.Redirect("http://member.topfo.com/indexTof.aspx");
                        Response.Redirect("indexTof.aspx");
                    }
                    else
                    {
                        //普通会员
                        //Response.Redirect("http://member.topfo.com/index.aspx");
                        Response.Redirect("index.aspx");
                    }
                }
            }
            #endregion
        }
        else
        {
            if (dt.Rows.Count == 0)
            {
                lblPasswordWrong.Text = "您输入的用户名或密码不正确,请重新登录!";
            }
            lblPasswordWrong.Visible = true;
        }

        #endregion
    }
예제 #23
0
    public void setNotice()
    {
        Tz888.BLL.Conn    dal   = new Tz888.BLL.Conn();
        HtmlInputCheckBox check = new HtmlInputCheckBox();
        //DataTable dt = dal.GetList("UserParametersTab", "*", "parID", 1, 1, 0, 1, "LoginName='" + Page.User.Identity.Name.Trim() + "'");
        DataTable dt = dal.GetList("UserParametersTab", "*", "parID", 1, 1, 0, 1, "LoginName='test'");

        if (dt.Rows.Count > 0)
        {
            string dzchk = dt.Rows[0]["SubscribeNotice"].ToString();//定制通知

            string strNotice = "";
            if (dzchk != "")
            {
                this.ViewState["Mobile"] = 0;
                string[] Notice = dzchk.Split('|');

                for (int i = 0; i < Notice.Length; i++)
                {
                    try
                    {
                        switch (Convert.ToInt32(Notice[i]))
                        {
                        case 1:
                            strNotice += "站内短信、";
                            break;

                        case 2:
                            strNotice += "电子邮件、";
                            break;

                        case 3:
                            strNotice += "手机短信、";
                            this.ViewState["Mobile"] = 1;
                            break;

                        default:
                            strNotice += "";
                            break;
                        }
                    }
                    catch { }
                }
                if (strNotice != "")
                {
                    strNotice = "您已选择使用" + strNotice + "的定阅通知";
                    //lbNotice.Text = strNotice + "<br> 请点击此处<a  href='javascript:ShowMessageWin()'><font color='#0000FF'>修改通知接收方式</font></a>";
                }
                else
                {
                    //lbNotice.Text = "您还没有进行定阅通知设置操作" + "<br> 请点击此处<a href='javascript:ShowMessageWin()'><font color='#0000FF'>添加通知接收方式</font></a>"; ;
                }
            }
            else
            {
                //lbNotice.Text = "您还没有进行定阅通知设置操作" + "<br> 请点击此处<a href='javascript:ShowMessageWin()'><font color='#0000FF'>添加通知接收方式</font></a>"; ;
            }

            if (!Page.User.IsInRole("GT1001") && Convert.ToInt32(this.ViewState["Mobile"]) == 1)
            {
                int count = Convert.ToInt32(dt.Rows[0]["MobileCount"]);
                if (count > 0)
                {
                    lbMobile.Text = "<font color='red'> 温馨提示:</font>您现在还可以接收" + count + "条手机短信。<a href='http://member.topfo.com/helper/buysms.aspx' target='_blank'><font color='red'>申请更多手机短信通知</font></a>";
                }
                else
                {
                    lbMobile.Text = " <font color='red'>温馨提示:</font>您的免费短信条数为0条,请您尽快<a href='http://member.topfo.com/helper/buysms.aspx' target='_blank'><font color='#0000FF'>购买短信</font></a>条数,以免贻误商机!";
                }
            }
        }
        else
        {
            //lbNotice.Text = "您还没有进行定阅通知设置操作" + "<br> 请点击此处<a href='javascript:ShowMessageWin()'><font color='#0000FF'>添加通知接收方式</font></a>"; ;
        }
    }
예제 #24
0
    public string GetContactDetail(string InfoID)
    {
        StringBuilder sb        = new StringBuilder();
        string        LoginName = "";

        #region 资源是否购买的提示信息

        //string WhetherCharges_button = "";  //按钮提示
        //string WhetherCharges_Clew = "";    //提示信息
        int            FixPriceID     = 0;                                               //资源是否收费
        string         infoTypeName   = "";
        decimal        MainPointCount = 0;                                               //资源报价
        string         userState      = "Charge";                                        // Charge购买 / Login登陆 / View查看
        string         payDomain      = System.Configuration.ConfigurationManager.AppSettings["payDomain"];
        string         buyUrl         = payDomain + "/order_item.aspx?InfoID=" + InfoID; //资源购买的路径
        Tz888.BLL.Conn dal            = new Tz888.BLL.Conn();
        DataTable      dt             = dal.GetList("MainInfoTab", "InfoID,FixPriceID,MainPointCount,InfoType", "InfoID", 1, 1, 0, 1, "InfoID=" + Convert.ToInt64(InfoID));
        if (dt != null && dt.Rows.Count > 0)
        {
            FixPriceID     = Convert.ToInt32(dt.Rows[0]["FixPriceID"].ToString().Trim());
            MainPointCount = Convert.ToDecimal(dt.Rows[0]["MainPointCount"].ToString().Trim());
            infoTypeName   = dt.Rows[0]["InfoType"].ToString().Trim();
        }
        if (MainPointCount > 0 && FixPriceID > 1)       //是否免费信息
        {
            bool bIsBuy = false;                        //这是一条收费信息
            Tz888.BLL.Info.CapitalInfoBLL ciBll = new Tz888.BLL.Info.CapitalInfoBLL();
            bIsBuy = ciBll.bIsBuyInfoOfUser(LoginName, InfoID);
            if (bIsBuy)
            {
                userState = "View";
            }
            else
            {
                userState = "Charge";
            }
        }
        else
        {
            userState = "View";
        }
        switch (userState)
        {
        case "View":        //提示查看
            //WhetherCharges_button = "<a href=\"#88\" onclick=\"javascript:GetContactDetail(" + InfoID + ");\" ><img src=\"/CommonV3/img/res3_btn13.gif\" alt=\"请点击查看\"></a>";
            //WhetherCharges_Clew = "<span class=\"tit f_tit3\">以下为项目核心资料,你需要购买才能查看!</span><span class=\"btn\">" +
            //    "<a href=\"#88\" onclick=\"javascript:GetContactDetail(" + InfoID + ");\"><img src=\"/CommonV3/img/res3_btn13.gif\" alt=\"点击查看\" /></a></span>" +
            //    "<div class=\"clear\"></div>";
            sb.Append("");
            break;

        case "Charge":      //提示购买
            //WhetherCharges_button = "<a href=\"" + buyUrl + "\"><img src=\"/CommonV3/img/res3_btn7.gif\" alt=\"请点击购买\"></a>";
            //WhetherCharges_Clew = "<span class=\"tit f_tit3\">以下为项目核心资料,你需要购买才能查看!</span><span class=\"btn\">" +
            //    "<a href=\"" + buyUrl + "\"><img src=\"/CommonV3/img/res3_btn7.gif\" alt=\"点击购买\" /></a></span>" +
            //    "<div class=\"clear\"></div>";
            break;
        }
        return(sb.ToString().Trim());

        #endregion
    }
예제 #25
0
    public void getList()
    {
        string strWhere = "";

        loginname = Page.User.Identity.Name;//"aaaaaa";
        loginname = "cn001";
        long CurrPage   = Convert.ToInt64(ViewState["CurrPage"]);
        long TotalCount = 0;

        Tz888.BLL.Conn dal = new Tz888.BLL.Conn();
        switch (commentType)
        {
        case 4:      //--默认
            strWhere = "infoOwner='" + loginname + "' and fatherId= '0' and IsDelete= '0'";
            //strWhere = "loginName='" + loginname + "' and fatherId= '0'and IsDelete= '0'";
            break;

        case 0:    //新留言
            strWhere = "infoOwner='" + loginname + "' and fatherId= '0' and IsDelete= '0' and IsResponse= '0' and IsAudit= '0'";
            break;

        case 1:     //已阅读
            strWhere = "(infoOwner='" + loginname + "' and fatherId= '0' and IsDelete= '0' and IsResponse= '1' ) or ( IsAudit!= '0'" + " and infoOwner='" + loginname
                       + "' and fatherId= '0' and IsDelete= '0')";
            break;

        case 2:     //已回复
            strWhere = "infoOwner='" + loginname + "' and fatherId= '0' and IsDelete= '0' and IsResponse= '1' ";
            break;

        case 3:     //已公开
            strWhere = "infoOwner='" + loginname + "' and fatherId= '0' and IsDelete= '0' and IsAudit!= '0' ";
            break;
        }
        if (ddlCommentTime.SelectedValue == "0")
        {
            strWhere += "";
        }
        else if (ddlCommentTime.SelectedValue == "91")
        {
            strWhere += " and DateDiff(d,CommentTime,getdate())>90 ";
        }
        else
        {
            strWhere += " and DateDiff(d,CommentTime,getdate())<" + Convert.ToInt32(ddlCommentTime.SelectedValue);
        }
        if (this.txtCommentSelect.Text.Trim() != "")
        {
            strWhere += " and (CHARINDEX('" + this.txtCommentSelect.Text.Trim() + "'," + "commentContent" + ")>0)";
        }
        DataTable dt = dal.GetList("InfoCommentManagerVIW", "InfoID", "LoginName,InfoID,Title,CommentContent,CommentTime,ID,IsAudit,IsResponse",
                                   strWhere, "CommentTime desc", ref CurrPage, Convert.ToInt64(ViewState["pagesize"]), ref TotalCount);

        outDataTable                 = dt;
        lblCount.Text                = TotalCount.ToString();
        lblCurrPage.Text             = CurrPage.ToString();
        lblPageCount.Text            = System.Math.Ceiling(Convert.ToDouble(TotalCount) / Convert.ToDouble(ViewState["pagesize"])).ToString();
        rptCommentReceive.DataSource = dt;
        rptCommentReceive.DataBind();
        if (TotalCount <= 0)
        {
            rptCommentReceive.Visible = false;
            lbMessage.Text            = "您还没有收到任何留言!";
            lbMessage.Visible         = true;
        }
        else
        {
            lbMessage.Visible         = false;
            rptCommentReceive.Visible = true;
        }
    }
예제 #26
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Page.User.Identity.Name == null || Page.User.Identity.Name.Trim() == "")
        {
            Response.Redirect("../../Login.aspx?ReturnUrl=" + Server.UrlEncode(Request.RawUrl));
            return;
        }

        if (Request.QueryString["name"] != null && Request.QueryString["name"].ToString() != "")
        {
            long           m           = 1;
            long           j           = 1;
            long           k           = 1;
            string         nickName    = "";
            string         strWhere    = "";
            string         memberGrade = "";
            string         manageType  = "";
            string         intent      = "";
            string         name        = "";
            bool           grade       = false;
            bool           type        = false;
            Tz888.BLL.Conn dal         = new Tz888.BLL.Conn();
            name = Request.QueryString["name"].ToString().Trim();
            //name = "kiki";
            strWhere = "loginName='" + name + "'";
            //strWhere = "nickName='" + name + "'";
            DataTable dt = dal.GetList("loginInfoTab", "loginName", "nickName", strWhere, "loginName", ref m, k, ref j);
            if (dt != null && dt.Rows.Count > 0)
            {
                nickName = dt.Rows[0][0].ToString();
            }
            //strWhere = "loginName= ' " + Page.User.Identity.Name + "'";
            strWhere = "loginName= ' " + name + "'";
            dt       = null;
            dt       = dal.GetList("loginInfoTab", "loginName", "MemberGradeId,ManageTypeId,requirInfo", strWhere, "loginName", ref m, k, ref j);
            if (dt != null && dt.Rows.Count > 0)
            {
                memberGrade = dt.Rows[0][0].ToString();
                manageType  = dt.Rows[0][1].ToString();
                intent      = dt.Rows[0][2].ToString();
            }
            Tz888.BLL.GoodFriend   friendBll = new Tz888.BLL.GoodFriend();
            Tz888.Model.GoodFriend set       = new Tz888.Model.GoodFriend();

            bool IsBlack = friendBll.IsSpecies(name, Page.User.Identity.Name, 3);
            //bool IsBlack = friendBll.IsSpecies("huangleon", "beckycheng", 3);
            if (IsBlack)
            {
                Response.Write("<script>alert('添加好友失败!您被加入黑名单');window.close();</script>");
                return;
            }
            bool IsFriend = friendBll.IsSpecies(Page.User.Identity.Name, name, 1);
            //bool IsFriend = friendBll.IsSpecies("huangleon", "beckycheng", 1);
            if (IsFriend)
            {
                Response.Write("<script>alert('添加好友失败!用户已在好友列表中');window.close();</script>");
                return;
            }

            if (name.Trim() == Page.User.Identity.Name.Trim())
            {
                Response.Write("<script>alert('添加好友失败!不能添加自己为好友');window.close();</script>");
                return;
            }
            //loginName = "kittycat";

            set = friendBll.GetFriendSet(name);
            if (set != null)
            {
                if (set.MemberGrade == 2)
                {
                    if (memberGrade == "1001")
                    {
                        grade = true;
                    }
                }
                else if (set.MemberGrade == 0)
                {
                    grade = true;
                }
                if (grade)
                {
                    if (set.MemberType == 0)
                    {
                        type = true;
                    }
                    else if (set.MemberType == 1)
                    {
                        if (manageType.Trim() == "1004")
                        {
                            type = true;
                        }
                    }
                    else if (set.MemberType == 2)
                    {
                        if (manageType.Trim() == "1003")
                        {
                            type = true;
                        }
                    }
                    else if (set.MemberType == 3)
                    {
                        if (manageType.Trim() == "1001")
                        {
                            type = true;
                        }
                    }
                }
            }
            else
            {
                type = true;
            }
            if (type)
            {
                Tz888.Model.GoodFriend model = new Tz888.Model.GoodFriend();
                model.LoginName   = Page.User.Identity.Name;
                model.ContactName = name;
                model.GroupId     = 1;
                friendBll.AddFriend(model);
                this.hplName.Text            = "恭喜,您已经成功添加" + nickName + "为您的好友了!";
                this.hplList.Text            = "查看您的好友列表";
                this.hplList.NavigateUrl     = "friendList.aspx";
                this.hplSendInfo.Text        = "给" + nickName + "发送站内短信";
                this.hplSendInfo.NavigateUrl = "../../innerinfo/SendView.aspx?Ac=0&name=" + nickName;
            }
            else
            {
                this.hplName.Text            = "对不起," + name + "  设置只有拓富通会员才能将他加为好友!";
                this.hplList.Text            = "了解一下拓富通会员服务";
                this.hplList.NavigateUrl     = "http://www.topfo.com/help/TopfoServer.shtml#a5";
                this.hplSendInfo.Text        = "立即申请拓富通会员服务";
                this.hplSendInfo.NavigateUrl = "http://member.topfo.com/Register/VIPMemberRegister_In.aspx";
            }
        }
    }
예제 #27
0
    private void LoadInfo(long InfoID)
    {
        Tz888.BLL.Conn dal = new Tz888.BLL.Conn();
        DataTable      dt  = dal.GetList("dicttab", "*", "idictvalue", 10, 1, 0, 0, " cdicttype='xmyxqxx' ");

        this.rdlValiditeTerm.DataTextField  = "cdictname";
        this.rdlValiditeTerm.DataValueField = "idictvalue";
        this.rdlValiditeTerm.DataSource     = dt;
        this.rdlValiditeTerm.DataBind();
        //2010-07-28 以上绑定项目有效期限


        Tz888.BLL.Info.MarchantInfoBLL    bll   = new Tz888.BLL.Info.MarchantInfoBLL();
        Tz888.Model.Info.MerchantSetModel model = bll.GetIntegrityModel(InfoID);



        //this.rblMerchantType.SelectedValue = "2"; //model.MerchantInfoModel.MerchantTypeID.Trim();
        this.txtMerchantTopic.Text = model.MainInfoModel.Title;
        if (model.MerchantInfoModel != null)
        {
            if (!string.IsNullOrEmpty(model.MerchantInfoModel.CountryCode.Trim()))
            {
                this.ZoneSelectControl1.CountryID = model.MerchantInfoModel.CountryCode.Trim();
            }
            if (!string.IsNullOrEmpty(model.MerchantInfoModel.ProvinceID.Trim()))
            {
                this.ZoneSelectControl1.ProvinceID = model.MerchantInfoModel.ProvinceID.Trim();
            }
            if (!string.IsNullOrEmpty(model.MerchantInfoModel.CityID.Trim()))
            {
                this.ZoneSelectControl1.CityID = model.MerchantInfoModel.CityID.Trim();
            }
            if (!string.IsNullOrEmpty(model.MerchantInfoModel.CountyID.Trim()))
            {
                this.ZoneSelectControl1.CountyID = model.MerchantInfoModel.CountyID.Trim();
            }
            this.SelectIndustryControl1.IndustryString = model.MerchantInfoModel.IndustryClassList.Trim();
            string CooperationDemandType = model.MerchantInfoModel.CooperationDemandType.Trim();
            #region 2010-06-11 新增字段的读取

            ////项目现状及规划
            //txtProjectStatus.Text = model.MerchantInfoModel.ProjectStatus;
            ////项目优势及市场分析
            //txtMarket.Text = model.MerchantInfoModel.Market;
            ////地方经济指标描述
            //txtEconomicIndicators.Text = model.MerchantInfoModel.EconomicIndicators;
            //////投资环境描述
            //txtInvestmentEnvironment.Text = model.MerchantInfoModel.InvestmentEnvironment;
            ////经济效益分析
            //txtBenefit.Text = model.MerchantInfoModel.Benefit;
            this.ddlCapitalCurrency.SelectedValue = model.MerchantInfoModel.CapitalCurrency;
            this.txtCapitalTotal.Text             = Convert.ToString(model.MerchantInfoModel.CapitalTotal);
            //this.ddlMerchantCurrency.SelectedValue = model.MerchantInfoModel.MerchantCurrency;
            //this.ddlMerchantTotal.SelectedValue = model.MerchantInfoModel.MerchantTotal;
            this.txtZoneAbout.Value = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(Tz888.Common.Utility.PageValidate.HtmlToTxt(model.MerchantInfoModel.ZoneAbout.Trim()));
            //if (!string.IsNullOrEmpty(model.MerchantInfoModel.ReceiveOrganization))
            //    this.MerchantInfoAddressInfo1.Undertaker = model.MerchantInfoModel.ReceiveOrganization.Trim();
            //else
            //    this.MerchantInfoAddressInfo1.Undertaker = "";
            txtAddress.Text             = model.InfoContactModel.Address;
            txtEmail.Text               = model.InfoContactModel.Email;
            txtMobile.Text              = model.InfoContactModel.Mobile;
            txtCompanyName.Text         = model.InfoContactModel.OrganizationName;
            txtName.Text                = model.InfoContactModel.Name;
            txtTelCountry.Text          = model.InfoContactModel.TelCountryCode;
            txtTelZoneCode.Text         = model.InfoContactModel.TelStateCode;
            txtTelNumber.Text           = model.InfoContactModel.TelNum;
            ViewState["ZoneAboutBrief"] = model.MerchantInfoModel.ZoneAboutBrief;
        }

        string[] cooType = model.MerchantInfoModel.CooperationDemandType.ToString().Split(new char[] { ',' });
        //for (int i = 0; i < cooType.Length; i++)//3,4,5,6,7,8,
        //{
        //    switch (cooType[i])
        //    {
        //        case"3":
        //            cblCooperationDemandType.Items[0].Selected = true;
        //            break;
        //        case"4":
        //            cblCooperationDemandType.Items[1].Selected = true;
        //            break;
        //        case"5":
        //            cblCooperationDemandType.Items[2].Selected = true;
        //            break;
        //        case"6":
        //            cblCooperationDemandType.Items[3].Selected = true;
        //            break;
        //        case "7":
        //            cblCooperationDemandType.Items[4].Selected = true;
        //            break;
        //        case "8":
        //            cblCooperationDemandType.Items[5].Selected = true;
        //            break;
        //        default:
        //            break;
        //    }
        //}
        //string CooperationDemandTypeItems;
        //for (int i = 0; i < cblCooperationDemandType.Items.Count; i++)
        //{
        //    CooperationDemandTypeItems = cblCooperationDemandType.Items[i].Value;
        //    //CooperationDemandTypeItems += ",";
        //    if (CooperationDemandTypeItems.IndexOf(CooperationDemandTypeItems) != -1)
        //        cblCooperationDemandType.Items[i].Selected = true;
        //}

        #endregion

        //if (!string.IsNullOrEmpty(model.MainInfoModel.KeyWord.Trim()))
        //{
        //    string[] keys = model.MainInfoModel.KeyWord.Trim().Split(',');
        //    for (int i = 0; i < keys.Length; i++)
        //    {
        //        string key = keys[i].ToString().Trim();
        //        switch (i)
        //        {
        //            case 0:
        //                this.txtKeyword1.Text = key;
        //                break;
        //            case 1:
        //                this.txtKeyword2.Text = key;
        //                break;
        //            case 2:
        //                this.txtKeyword3.Text = key;
        //                break;
        //            default:
        //                break;
        //        }
        //    }
        //}
        // this.ddlValiditeTerm.SelectedValue = model.MainInfoModel.ValidateTerm.ToString();
        //07-28项目有效期限
        this.rdlValiditeTerm.SelectedValue = model.MainInfoModel.ValidateTerm.ToString();

        this.FilesUploadControl1.InfoList = model.InfoResourceModels;
        this.FilesUploadControl1.InfoType = "Merchant";

        //this.MerchantInfoAddressInfo1.InfoContact = model.InfoContactModel; //控件
        //this.MerchantInfoAddressInfo1.infoContact = model.InfoContactManModels;
        if (Request.UrlReferrer != null)
        {
            ViewState["strPrePage"] = Request.UrlReferrer.ToString();
        }
        else
        {
            ViewState["strPrePage"] = "";
        }
        ViewState["InfoID"]   = model.MainInfoModel.InfoID;
        ViewState["PublishT"] = model.MainInfoModel.publishT;

        ViewState["AuditingStatus"] = model.MainInfoModel.AuditingStatus;
        ViewState["HtmlFile"]       = model.MainInfoModel.HtmlFile;
        if (model.ShortInfoModel != null)
        {
            ViewState["ShortTitle"]         = model.ShortInfoModel.ShortTitle;
            ViewState["ShortContent"]       = model.ShortInfoModel.ShortContent;
            ViewState["ShortInfoControlID"] = model.ShortInfoModel.ShortInfoControlID;
        }
    }
    public void bind()
    {
        string strWhere   = "";
        string LoginName  = "cn001";
        long   CurrPage   = Convert.ToInt64(ViewState["CurrPage"]);
        long   PageSize   = Convert.ToInt64(ViewState["pagesize"]);
        long   TotalCount = 0;

        //未指定搜索条件
        lblUserPoint.Text = OnlineStrike.getUserPoint(LoginName).ToString();
        if (ddldiff.Value.Trim() == "all" && ddltype.Value.Trim() == "all" && ddluserType.Value.Trim() == "all")
        {
            strWhere = "LoginName='" + LoginName + "'";
        }
        //按照资源类型搜索
        if (ddldiff.Value.Trim() == "all" && ddltype.Value.Trim() != "all" && ddluserType.Value.Trim() == "all")
        {
            strWhere = "LoginName='" + LoginName + "' and InfoTypeID='" + ddltype.Value.Trim() + "'";
        }
        //按用户类型搜索

        if (ddldiff.Value.Trim() == "all" && ddltype.Value.Trim() == "all" && ddluserType.Value.Trim() != "all")
        {
            strWhere = "LoginName='" + LoginName + "'";
        }
        //按时间搜索

        if (ddldiff.Value.Trim() != "all" && ddltype.Value.Trim() == "all" && ddluserType.Value.Trim() == "all")
        {
            if (ddldiff.Value.Trim() == "90")
            {
                strWhere = "LoginName='" + LoginName + "' and DateDiff(d,packdate,getdate())>" + ddldiff.Value.Trim();
            }
            else
            {
                strWhere = "LoginName='" + LoginName + "' and DateDiff(d,packdate,getdate())<" + ddldiff.Value.Trim();
            }
        }
        //按时间与资源类型
        if (ddldiff.Value.Trim() != "all" && ddltype.Value.Trim() != "all" && ddluserType.Value.Trim() == "all")
        {
            if (ddldiff.Value.Trim() == "90")
            {
                strWhere = "LoginName='" + LoginName + "' and InfoTypeID='" + ddltype.Value.Trim() + "' and DateDiff(d,packdate,getdate())>" + ddldiff.Value.Trim();
            }
            else
            {
                strWhere = "LoginName='" + LoginName + "' and InfoTypeID='" + ddltype.Value.Trim() + "' and DateDiff(d,packdate,getdate())<" + ddldiff.Value.Trim();
            }
        }
        //按时间与用户类型
        if (ddldiff.Value.Trim() != "all" && ddltype.Value.Trim() == "all" && ddluserType.Value.Trim() != "all")
        {
            if (ddldiff.Value.Trim() == "90")
            {
                strWhere = "LoginName='" + LoginName + "'";
            }
            else
            {
                strWhere = "LoginName='" + LoginName + "'";
            }
        }
        //按资源用户类型

        if (ddldiff.Value.Trim() == "all" && ddltype.Value.Trim() != "all" && ddluserType.Value.Trim() != "all")
        {
            if (ddldiff.Value.Trim() == "90")
            {
                strWhere = "LoginName='" + LoginName + "' and InfoTypeID='" + ddltype.Value.Trim() + "'";
            }
            else
            {
                strWhere = "LoginName='" + LoginName + "' and InfoTypeID='" + ddltype.Value.Trim() + "'";
            }
        }
        //按时间 用户类型 资源类型
        if (ddldiff.Value.Trim() != "all" && ddltype.Value.Trim() != "all" && ddluserType.Value.Trim() != "all")
        {
            if (ddldiff.Value.Trim() == "90")
            {
                strWhere = "LoginName='" + LoginName + "' and InfoTypeID='" + ddltype.Value.Trim() + "' and DateDiff(d,packdate,getdate())>" + ddldiff.Value.Trim();
            }
            else
            {
                strWhere = "LoginName='" + LoginName + "' and InfoTypeID='" + ddltype.Value.Trim() + "' and DateDiff(d,packdate,getdate())<" + ddldiff.Value.Trim();
            }
        }
        DataTable dt = bll.GetList("ShopCarVIW", "ShopCarID", "*", strWhere, "ShopCarID desc", ref CurrPage, PageSize, ref TotalCount);

        lblCount.Text     = TotalCount.ToString();
        lblPageCount.Text = System.Math.Ceiling(Convert.ToDouble(TotalCount) / Convert.ToDouble(PageSize)).ToString();
        lblCurrPage.Text  = CurrPage.ToString();
        txtPage.Value     = CurrPage.ToString();
        lblCount.Text     = TotalCount.ToString();
        Pager();
        myList.DataSource = dt.DefaultView;
        myList.DataBind();
    }
예제 #29
0
        /// <summary>
        /// 所有招商视频数量
        /// </summary>
        /// <returns></returns>
        public string GetVideoCount()
        {
            DataTable dt = dal.GetList("VideoInfoviw", "InfoID", "InfoID", 1, 1, 1, 1, "AuditingStatus=1");

            return(dt.Rows[0].ItemArray[0].ToString());
        }
예제 #30
0
    private void Display()
    {
        Tname     = Tz888.Common.DEncrypt.DEncrypt.Decrypt(Request.QueryString["logname"]);
        TpassWord = Tz888.Common.DEncrypt.DEncrypt.Decrypt(Request.QueryString["PassWord"]);
        //验证用户名与密码是否正确
        int          ErrorID   = 0;
        string       ErrorMsg  = "";
        LoginInfoBLL loginRule = new LoginInfoBLL();
        DataTable    dt        = new DataTable();

        dt = loginRule.Authenticate(
            Tname,
            0,
            TpassWord,
            false,
            ref ErrorID,
            ref ErrorMsg);

        if (dt.Rows.Count > 0)
        {
            //写登陆cookie开始
            HttpCookie loginedUser = new HttpCookie("loginedUser");
            loginedUser.Expires = DateTime.Now.AddDays(1);
            loginedUser.Value   = Tname;
            Response.Cookies.Add(loginedUser);
            //写登陆cookie结束
            Tz888.BLL.Login.LoginInfoBLL.Logout();

            //分配验证票,同时建立角色信息
            LoginInfoBLL.SetUserFormsCookie(Tname, dt.Rows[0]["MemberGradeID"].ToString().Trim(), dt.Rows[0]["ManageTypeID"].ToString().Trim(), true);
            #region  登录后SESSION记录 用户名,用户角色以及 角色组
            Tz888.BLL.Conn dal        = new Tz888.BLL.Conn();
            DataTable      dtUser     = dal.GetList("VipApplyTab", "BuyTerm", "ApplyID", 1, 1, 0, 1, "LoginName='" + Tname + "'");
            string         MemberType = "";
            if (dtUser != null && dtUser.Rows.Count > 0)
            {
                MemberType = dtUser.Rows[0]["BuyTerm"].ToString();
            }
            else
            {
                MemberType = "1";
            }

            string[] obj = { Tname, dt.Rows[0]["ManageTypeID"].ToString().Trim(), MemberType };

            Session["MemberObj"] = obj;

            #endregion

            if (!(HttpContext.Current.User == null))
            {
                if (HttpContext.Current.User.Identity.AuthenticationType == "Forms")
                {
                    System.Web.Security.FormsIdentity id;
                    id = (System.Web.Security.FormsIdentity)HttpContext.Current.User.Identity;
                    String[] myRoles = new String[6];
                    myRoles[0] = "2001";
                    myRoles[1] = "2002";
                    myRoles[2] = "2003";
                    myRoles[3] = "2004";
                    myRoles[4] = "2006";
                    myRoles[5] = "2007";
                    HttpContext.Current.User = new System.Security.Principal.GenericPrincipal(id, myRoles);
                }
            }

            #region 获取跳转链接并跳转

            if (dt.Rows[0]["MemberGradeID"].ToString().Trim() == "1002")
            {
                //拓富会员
                Response.Redirect("../indexTof.aspx");
            }
            else
            {
                //普通会员
                //Response.Redirect("http://member.topfo.com/index.aspx");
                Response.Redirect("../index.aspx");
            }
            #endregion
        }
    }