Esempio n. 1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Page.User.Identity.Name == null || Page.User.Identity.Name.Trim() == "")
     {
         Response.Redirect("../Login.aspx");
     }
     //page指令中设置了不安全验证
     Tz888.Model.InnerInfo model   = new Tz888.Model.InnerInfo();
     Tz888.BLL.InnerInfo   infoBLL = new Tz888.BLL.InnerInfo();
     if (Request.QueryString["ReceivedId"] != null && Request.QueryString["ReceivedId"] != "")
     {
         model = infoBLL.GetInfoContext(Convert.ToInt32(Request.QueryString["ReceivedId"]), 0);
     }
     this.HlpTopic.Text     = model.Topic;
     this.InfoTime.Text     = model.InfoTime.ToString();
     this.HplSendman.Text   = model.SendName;
     this.TBoxInfoText.Text = model.Context;
     infoBLL.ReadInfoSet(Convert.ToInt32(Request.QueryString["ReceivedId"]));
     if (Request.QueryString["Ac"] != null && Request.QueryString["Ac"] != "")
     {
         if (Convert.ToInt32(Request.QueryString["Ac"].Trim()) == 1)
         {
             SetResponse();
         }
     }
     if (model.SendName.Trim() == "拓富网" || model.SendName.Trim().ToLower() == "tz888admin")
     {
         //this.BtnStartResponse.Visible = false;
         this.BtnInfoResponse.Visible = false;
         this.plreply.Visible         = false;
         this.HplSendman.Text         = "拓富网";
     }
 }
Esempio n. 2
0
    /// <summary>
    /// 发送站内短信

    /// </summary>
    private void SendLoginNameShort(string descript, DataTable dt)
    {
        Tz888.BLL.InnerInfo   infoBLL   = new Tz888.BLL.InnerInfo();
        Tz888.Model.InnerInfo infomodel = new Tz888.Model.InnerInfo();
        foreach (DataRow dataRow in dt.Rows)
        {
            infomodel.SendName    = loginname; //"020bluemax";//发件人
            infomodel.Topic       = "推广信息:" + title;
            infomodel.SendName    = loginname; //dataRow["loginname"].ToString().Trim();
            infomodel.Context     = descript;
            infomodel.InfoTime    = DateTime.Now;
            infomodel.ReceiveName = dataRow["loginname"].ToString().Trim(); //收件人"hellocindy";
            infomodel.ChangeBy    = loginname;                              //"020bluemax";//修改人

            bool statu = infoBLL.SendInfoBLL(infomodel, true);
            if (statu)
            {
                Tz888.BLL.SubscribeSet         bll   = new Tz888.BLL.SubscribeSet();
                Tz888.Model.SubscribeSetTabLog model = new Tz888.Model.SubscribeSetTabLog();
                model.LoginName = dataRow["loginname"].ToString().Trim();
                model.SubType   = "站内短信";
                model.Sid       = id;
                bll.Insert(model);
            }
        }
    }
Esempio n. 3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Tz888.BLL.InnerInfo obj = new Tz888.BLL.InnerInfo();
        DataTable           dt  = obj.getFriends(Page.User.Identity.Name);

        this.lstFriend.DataSource = dt;
        lstFriend.DataValueField  = dt.Columns["ContactId"].ToString();
        lstFriend.DataTextField   = dt.Columns["ContactName"].ToString();
        this.lstFriend.DataBind();
    }
Esempio n. 4
0
    protected void btnClear_Click(object sender, EventArgs e)
    {
        string loginName = Page.User.Identity.Name;

        //string loginName = "1210";//登录名
        Tz888.BLL.InnerInfo infoBll = new Tz888.BLL.InnerInfo();

        bool result = infoBll.DeleteAllWasterInfo(loginName);

        getList();
    }
Esempio n. 5
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));
        }
        Tz888.Model.InnerInfo model   = new Tz888.Model.InnerInfo();
        Tz888.BLL.InnerInfo   infoBLL = new Tz888.BLL.InnerInfo();
        string userName = Page.User.Identity.Name;

        if (Request.QueryString.Count > 0)
        {
            if (Request.QueryString["SendId"] != null && Request.QueryString["SendId"] != "" && Request.QueryString["SendId"] != "%")
            {
                model = infoBLL.GetInfoContext(Convert.ToInt32(Request.QueryString["SendId"]), 1);

                this.txtReceivedMan.Text = model.ReceiveName;
                this.txtTopic.Text       = model.Topic;
                this.txtContext.Text     = model.Context;
            }
            if (Request.QueryString["name"] != null && Request.QueryString["name"].ToString() != "" && Request.QueryString["name"].ToString() != "%")
            {
                this.txtReceivedMan.Text = Request.QueryString["name"].ToString();
            }
        }
        //userName = "******";
        //好友列表
        //DataTable dt = infoBLL.getFriends(userName);


        //string strWhere = "loginName='" + userName + "'";
        //Tz888.BLL.Conn dal = new Tz888.BLL.Conn();
        //string sqlText = "select DISTINCT nickName from innerInfoContactManInfoVIW where loginName='" + userName + "' and groupId=1";
        //DataTable dt = Tz888.DBUtility.DbHelperSQL.Query(sqlText).Tables[0];

        long CurrPage   = 0;
        long TotalCount = 0;
        long pageSize   = 0;

        Tz888.BLL.Conn dal      = new Tz888.BLL.Conn();
        string         strWhere = "loginName= '" + userName + "'and groupId= '1'";
        DataTable      dt       = dal.GetList("innerInfoContactManInfoVIW", "ContactId",
                                              "ContactId,nickName", strWhere, "ContactId desc", ref CurrPage, pageSize, ref TotalCount);

        this.lstFriend.DataSource = dt;

        if (dt != null && dt.Rows.Count > 0)
        {
            lstFriend.DataValueField = dt.Columns["ContactId"].ToString();
            lstFriend.DataTextField  = dt.Columns["nickName"].ToString();
        }
        this.lstFriend.DataBind();
    }
Esempio n. 6
0
 public string ToRecycle(string idList)
 {
     Tz888.BLL.InnerInfo infoBll = new Tz888.BLL.InnerInfo();
     string[]            s       = idList.Split(',');
     for (int i = 0; i < s.Length; i++)
     {
         if (s[i].Trim() != "")
         {
             bool b = infoBll.InfoVirtualDelete("huanglelou", Convert.ToInt32(s[i]), 0, "");
         }
     }
     return("ok");
 }
Esempio n. 7
0
    public string ToRecycle(string idList)
    {
        Tz888.BLL.InnerInfo infoBll = new Tz888.BLL.InnerInfo();
        string userName             = Page.User.Identity.Name;

        string[] s = idList.Split(',');
        for (int i = 0; i < s.Length; i++)
        {
            if (s[i].Trim() != "")
            {
                bool b = infoBll.DeleteWasterInfo(Convert.ToInt32(s[i]));
            }
        }
        return("ok");
    }
Esempio n. 8
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Page.User.Identity.Name == null || Page.User.Identity.Name.Trim() == "")
     {
         Response.Redirect("../Login.aspx");
     }
     Tz888.Model.InnerInfo model   = new Tz888.Model.InnerInfo();
     Tz888.BLL.InnerInfo   infoBLL = new Tz888.BLL.InnerInfo();
     if (Request.QueryString["wasterId"] != null && Request.QueryString["wasterId"] != "")
     {
         //int waster = 29;
         model = infoBLL.GetInfoContext(Convert.ToInt32(Request.QueryString["wasterId"]), 2);
         //model = infoBLL.GetInfoContext(waster, 2);
         this.HlpTopic.Text      = model.Topic;
         this.HplSendman.Text    = model.SendName;
         this.HplReceiveman.Text = model.ReceiveName;
         this.TBoxInfoText.Text  = model.Context;
     }
 }
Esempio n. 9
0
    protected void BtnInfoResponse_Click(object sender, EventArgs e)
    {
        bool result = false;

        Tz888.BLL.InnerInfo   infoBLL   = new Tz888.BLL.InnerInfo();
        Tz888.Model.InnerInfo infoModel = new Tz888.Model.InnerInfo();
        //设置Model字段成员
        infoModel.Topic       = this.TBoxResponseTopic.Text;
        infoModel.Context     = this.TBoxResponseText.Text;
        infoModel.ReceiveName = this.TboxReceiveName.Text;

        infoModel.SendName = Page.User.Identity.Name;
        infoModel.ChangeBy = Page.User.Identity.Name;
        //infoModel.SendName = "sunray";
        //infoModel.ChangeBy = "sunray";
        infoModel.SendId = 0;
        result           = infoBLL.SendInfoBLL(infoModel, this.CheckBoxSaveOther.Checked);
        Response.Redirect("inbox2.aspx?");
    }
Esempio n. 10
0
    protected void butSend_Click(object sender, EventArgs e)
    {
        string strReceivedMan = txtReceivedMan.Text.Trim();

        string[] ReceivedMan = strReceivedMan.Split(',');
        for (int i = 0; i < strReceivedMan.Split(',').Length; i++)
        {
            InnerInfoSend info = new InnerInfoSend();
            info.SendID      = 0;
            info.LoginName   = "liyanlili";//tzWeb.LoginInfo.GetLoginUserName(0);
            info.ReceivedMan = ReceivedMan[i].Trim();
            //info.Topic = Invest.WebRule.common.TxtToHtml(txtTopic.Text.Trim());
            //info.Context = Invest.WebRule.common.TxtToHtml(txtContext.Text.TrimEnd());
            info.Size     = txtContext.Text.TrimEnd().Length + txtTopic.Text.Trim().Length;
            info.ChangeBy = "liyanlili";                //tzWeb.LoginInfo.GetLoginUserName(0);

            bool IsSave             = cbIsSave.Checked; //是否保存到放件箱
            Tz888.BLL.InnerInfo obj = new Tz888.BLL.InnerInfo();
            bool b = obj.SendInfo(info);
        }
        Response.Write("<script>alert('短消息发送成功!')</script>");
        Response.Redirect("Sent.aspx");
    }
Esempio n. 11
0
    private void bind()
    {
        Tz888.BLL.Conn           dal       = new Tz888.BLL.Conn();
        Tz888.BLL.SubscribeSet   bll       = new Tz888.BLL.SubscribeSet();
        Tz888.BLL.InnerInfo      infoBLL   = new Tz888.BLL.InnerInfo();
        Tz888.Model.InnerInfo    infomodel = new Tz888.Model.InnerInfo();
        Tz888.Model.SubscribeSet model     = new Tz888.Model.SubscribeSet();
        model  = bll.GetModels(id, out infotypeid, out htmlFile);
        InfoID = model.InfoID;
        title  = model.Title;
        bll.GetDescript(InfoID, infotypeid.Trim(), out descript);
        long CurrPage   = Convert.ToInt64(ViewState["CurrPage"]);
        long TotalCount = 0;

        string[] countryCode    = model.CountryCode.Split(new char[] { ',' });
        string[] provinceID     = model.ProvinceID.Split(new char[] { ',' });
        string[] cityid         = model.CityID.Split(new char[] { ',' });
        string[] countyId       = model.CountyID.Split(new char[] { ',' });
        string[] objectGradeID  = model.objectGradeID.Split(new char[] { ',' });
        string[] ManageTypeId   = model.ManageTypeId.Split(new char[] { ',' });
        string[] Promotioncount = model.Promotioncount.Split(new char[] { ',' }); //推广条数
        SubscribeType = model.SubscribeType.Split(new char[] { ',' });            //推广类型

        SubType = model.SubscribeType;
        ViewState["SubType"] = SubType;
        string strWhere   = "";
        int    countTatol = 0;

        for (int i = 0; i < countryCode.Length - 1; i++)
        {
            if (objectGradeID[i] != "")
            {
                strWhere += " memberGradeId='" + objectGradeID[i] + "'";//'1001'";
            }
            if (ManageTypeId[i] != "")
            {
                strWhere += " and ManageTypeId='" + ManageTypeId[i] + "'";//'2003'"
            }
            ViewState["strWhere"] = strWhere;
            if (provinceID[i] != "")
            {
                if (countyId[i] != "" && cityid[i] != "") //区

                {
                    strWhere += " and countyId='" + countyId[i] + "'";
                    SendSummey(dal, descript, htmlFile, ref CurrPage, ref TotalCount, Promotioncount, SubscribeType, ref strWhere, ref countTatol);
                }
                if (!site || !email || !phone)
                {
                    if (cityid[i] != "")//市

                    {
                        strWhere += " and CityId='" + cityid[i] + "'";
                        SendSummey(dal, descript, htmlFile, ref CurrPage, ref TotalCount, Promotioncount, SubscribeType, ref strWhere, ref countTatol);
                    }
                }
            }
            if (!site || !email || !phone)
            {
                if (provinceID[i] != "")//省

                {
                    strWhere += " and provinceID='" + provinceID[i] + "'";
                    SendSummey(dal, descript, htmlFile, ref CurrPage, ref TotalCount, Promotioncount, SubscribeType, ref strWhere, ref countTatol);
                }
            }
            if (!site || !email || !phone)
            {
                if (countryCode[i] != "")
                {
                    strWhere += " countryCode='" + countryCode[i] + "'";//国家
                    SendSummey(dal, descript, htmlFile, ref CurrPage, ref TotalCount, Promotioncount, SubscribeType, ref strWhere, ref countTatol);
                }
            }
            if (!site || !email || !phone)
            {
                SendSummey(dal, descript, htmlFile, ref CurrPage, ref TotalCount, Promotioncount, SubscribeType, ref strWhere, ref countTatol);
            }
            break;
        }
    }
Esempio n. 12
0
    protected void butSend_Click(object sender, EventArgs e)
    {//发送消息
        if (txtReceivedMan.Text.Trim() == "")
        {
            return;
        }
        if (txtTopic.Text.Trim() == "")
        {
            return;
        }
        if (txtContext.Text.Trim() == "")
        {
            return;
        }
        bool result = false;

        Tz888.Model.InnerInfo model   = new Tz888.Model.InnerInfo();
        Tz888.BLL.InnerInfo   infoBLL = new Tz888.BLL.InnerInfo();
        string[] s = this.txtReceivedMan.Text.Split(',');

        model.SendName = Page.User.Identity.Name;
        //model.SendName = "kiki";
        model.Topic    = this.txtTopic.Text;
        model.Context  = this.txtContext.Text;
        model.InfoTime = DateTime.Now;
        model.ChangeBy = Page.User.Identity.Name;

        for (int i = 0; i < s.Length; i++)
        {
            if (s[i].Trim() != "")
            {
                Tz888.BLL.Conn dal      = new Tz888.BLL.Conn();
                long           m        = 0;
                long           k        = 0;
                long           j        = 0;
                string         name     = s[i].Trim();
                string         strWhere = "nickName='" + name + "'";
                DataTable      dt       = dal.GetList("loginInfoTab", "loginName", "loginName", strWhere, "loginName", ref m, k, ref j);
                if (dt == null)
                {
                    Tz888.Common.MessageBox.Show(this.Page, "收件人用户[" + name + "]不存在!");
                    return;
                }
                else
                {
                    if (dt.Rows.Count == 0)
                    {
                        Tz888.Common.MessageBox.Show(this.Page, "收件人用户[" + name + "]不存在!");
                        return;
                    }
                }
                if (dt != null && dt.Rows.Count > 0)
                {
                    model.ReceiveName = dt.Rows[0][0].ToString().Trim();
                }
                //else
                //{
                //    Tz888.Common.MessageBox.Show(this.Page, "收件人用户[" + name + "]不存在!");
                //    return;
                //}
                //model.ReceiveName = s[i];

                //SendId 自动生成
                Tz888.BLL.GoodFriend friendBll = new Tz888.BLL.GoodFriend();
                bool bl = friendBll.IsSpecies(model.ReceiveName, Page.User.Identity.Name, 3);
                if (!bl)
                {
                    result = infoBLL.SendInfoBLL(model, this.cbIsSave.Checked);
                    Tz888.Common.MessageBox.ShowAndHref("短消息发送成功", "SendBox2.aspx");
                }
                else
                {
                    Response.Write("<script>alert('短消息发送失败!您被" + name + "加入黑名单')</script>");
                }
            }
        }
    }
Esempio n. 13
0
 public void CheckNewGroupMsg()
 {
     Tz888.BLL.InnerInfo bll = new Tz888.BLL.InnerInfo();
     bll.CheckNewGroupMsg(Page.User.Identity.Name);
 }
Esempio n. 14
0
    public string dgGetInner()
    {
        try
        {
            //DataSet ds;
            //return ds.GetXml();

            StringWriter   wr     = new StringWriter();
            HtmlTextWriter writer = new HtmlTextWriter(wr);
            DataGrid       dg     = new DataGrid();
            StringBuilder  sb     = new StringBuilder();

            //读取用户的身份信息
            string LoginName = LoginInfoBLL.GetCookieContentByCookieType(0);

            Tz888.BLL.InnerInfo bll = new Tz888.BLL.InnerInfo();
            bll.CheckNewGroupMsg(LoginName);

            if (LoginName.Trim() != "")
            {
                Tz888.BLL.Conn         conn     = new Conn();
                Tz888.BLL.InnerInfoBLL bllInner = new InnerInfoBLL();
                string    strWhere = "ReceivedName='" + LoginName + "' and isReaded=0";
                DataTable dt       = conn.GetList("InnerInfoReceivedTab", "*", "ReceivedID", 3, 1, 0, 1, strWhere);
                DataTable dtCount  = conn.GetList("InnerInfoReceivedTab", "ReceivedID", "ReceivedID", 1, 1, 1, 1, strWhere);

                //long lgPageCount = 0;
                //DataView dv = bllInner.dsGetAllInnerNoRead(LoginName, ref lgPageCount);

                sb.Append("<div class='notemsg1'>您共收到 <a href='/InnerInfo/inbox2.aspx' class='chenglink'>" + dtCount.Rows[0].ItemArray[0].ToString() + "条</a>新短消息</div>");
                sb.Append("<table width=100% border=0 cellpadding=0 cellspacing=0 >");
                if (dt != null && dt.Rows.Count > 0)
                {
                    sb.Append("<tr><td>标题</td><td>发件人</td><td>时间</td></tr>");
                    for (int i = 0; i < dt.Rows.Count; i++)
                    {
                        sb.Append("<tr>");
                        sb.Append("<td width=53%><a href='InnerInfo/infoView.aspx?Ac=1&ReceivedID=" + dt.Rows[i]["ReceivedID"].ToString() + "'>" + GetStr(dt.Rows[i]["Topic"].ToString().Trim(), 13) + "</a></td>");
                        sb.Append("<td width=25%>" + dt.Rows[i]["SendedMan"].ToString().Trim() + "</td>");
                        sb.Append("<td width=23%>" + Convert.ToDateTime(dt.Rows[i]["ReceivedTime"].ToString().Trim()).ToString("yyyy-MM-dd") + "</td>");
                        sb.Append("</tr>");
                        if (i > 4)
                        {
                            break;
                        }
                    }
                }
                else
                {
                    sb.Append("<tr><td>您没有收到新的短消息!</td></tr>");
                }


                sb.Append("</table>");
                sb.Append("<div class='entermail'><a href='/InnerInfo/inbox2.aspx'  class='blue'>&gt;&gt;进入我的收件箱</a></div></div>");
            }
            return(sb.ToString());
        }
        catch (Exception ex)
        {
            string err = ex.Message.ToString();
            err = "";
            return(err);
        }
    }