Esempio n. 1
0
        /// <summary>
        /// 判断用户是否被禁言的频道
        /// </summary>
        /// <param name="LoginName">登录名</param>
        /// <param name="Menu">频道</param>
        /// <returns>被禁言的天数和禁言的方式以及禁言的天数</returns>
        public static string IsForbids(string LoginName, string Menu)
        {
            DataTable dtAll = dal.GetList("ForbidsTab", "*", "ForbidsDate", 1, 1, 0, 1, "FLoginName='" + LoginName + "' and ForbidsMenu='All'");//首先判断时候全部禁言

            if (dtAll.Rows.Count > 0)
            {
                if (dtAll.Rows[0]["ForbidsType"].ToString() == "1")             //永久禁言
                {
                    return(dtAll.Rows[0]["ForbidsDate"].ToString() + "|" + dtAll.Rows[0]["ForbidsType"].ToString() + "|" + dtAll.Rows[0]["ForbidsDays"].ToString());
                }
                else
                {
                    if (FDays(Convert.ToDateTime(dtAll.Rows[0]["ForbidsDate"]), Convert.ToInt32(dtAll.Rows[0]["ForbidsDays"])))
                    {
                        return(dtAll.Rows[0]["ForbidsDate"].ToString() + "|" + dtAll.Rows[0]["ForbidsType"].ToString() + "|" + dtAll.Rows[0]["ForbidsDays"].ToString());
                    }
                    else
                    {
                        return("");
                    }
                }
            }
            else
            {
                DataTable dtMenu = dal.GetList("ForbidsTab", "*", "ForbidsDate", 1, 1, 0, 1, "FLoginName='" + LoginName + "' and ForbidsMenu='" + Menu + "'");
                if (dtMenu.Rows.Count > 0)
                {
                    if (dtMenu.Rows[0]["ForbidsType"].ToString() == "1")                 //永久禁言
                    {
                        return(dtMenu.Rows[0]["ForbidsDate"].ToString() + "|" + dtMenu.Rows[0]["ForbidsType"].ToString() + "|" + dtMenu.Rows[0]["ForbidsDays"].ToString());
                    }
                    else
                    {
                        if (FDays(Convert.ToDateTime(dtMenu.Rows[0]["ForbidsDate"]), Convert.ToInt32(dtMenu.Rows[0]["ForbidsDays"])))
                        {
                            return(dtMenu.Rows[0]["ForbidsMenu"].ToString() + "|" + dtMenu.Rows[0]["ForbidsType"].ToString() + "|" + dtMenu.Rows[0]["ForbidsDays"].ToString());
                        }
                        else
                        {
                            return("");
                        }
                    }
                }
                else
                {
                    return("");
                }
            }
        }
Esempio n. 2
0
        public void MacthingInfo()
        {
            Tz888.BLL.SendNotice notice = new SendNotice();
            DataTable            dt1    = dalSend.GetMachInfoList("");//所有订阅人列表

            for (int i = 0; i < dt1.Rows.Count; i++)
            {
                string    loginname   = dt1.Rows[i]["LoginName"].ToString().Trim();
                DataTable dtGetTool   = obj.GetList("UserParametersTab", "NoticeEmail,NoticeMobile", "parID", 1, 1, 0, 1, "loginname='" + loginname + "'");
                string    email       = dtGetTool.Rows[0]["NoticeEmail"].ToString().Trim();
                string    mobile      = dtGetTool.Rows[0]["NoticeMobile"].ToString().Trim();
                DataTable dt2         = dalSend.GetMachInfoList(loginname);//订阅ID
                string    TempStr     = DownUrl("http://member.topfo.com/helper/sendMachinfo.aspx?ID=" + dt2.Rows[0]["ID"].ToString(), "GB2312");
                string    title       = GetCustomType("0");
                string    siteContent = "您有新的订阅信息,请进“拓富助手-我的订阅”中查看!";
                notice.InfoMatching(loginname, siteContent, title + "信息订阅" + DateTime.Now.ToShortDateString(), siteContent, TempStr);
            }
        }
Esempio n. 3
0
 public DataTable GetList(string tblName, string strGetFields, string fldName, int PageSize, int PageIndex, int doCount, int OrderType, string strWhere)
 {
     return(dal.GetList(tblName, strGetFields, fldName, PageSize, PageIndex, doCount, OrderType, strWhere));
 }