Exemplo n.º 1
0
 protected void btnadminLogin_Click(object sender, EventArgs e)
 {
     cusername = (this.adminName.Value == "用户名" ? null : this.adminName.Value);
     cuserpwd  = (this.adminPwd.Value == "请输入密码" ? null : this.adminPwd.Value);
     if (cusername != null && cuserpwd != null)
     {
         starweibo.BLL.adminInfo curuser = new adminInfo();
         cadminInfo  = curuser.GetModelList("adminName='" + cusername + "'");
         cadmincount = curuser.GetRecordCount("adminName='" + cusername + "'");
         if (cadmincount == 0)
         {
             i = 0;
         }
         else
         {
             if (cadminInfo[0].adminPwd == adminPwd.Value)
             {
                 Session["adminName"] = cusername;
                 Session["adminPwd"]  = cuserpwd;
                 Response.Redirect("~/adminManage.aspx");
             }
             else
             {
                 i = 1;
             }
         }
     }
 }
Exemplo n.º 2
0
        /// <summary>
        /// 账户详情
        /// </summary>
        /// <param name="mobile"></param>
        /// <param name="pass"></param>
        /// <returns></returns>
        public adminInfo adminInfo(int ID)
        {
            adminInfo admin = null;
            string    sql   = "select * from tbl_admin_User where id = " + ID;

            try
            {
                using (DataTable dt = helper.GetDataTable(sql))
                {
                    if (dt != null && dt.Rows.Count > 0)
                    {
                        Dictionary <int, smsChannelSetting> Dic  = new _SmsChannelSetting().GetSmsChannelSettingDic();
                        Dictionary <int, smsChannel>        DicC = new _SmsChannel().GetSmsChannelDic();
                        DataRow r = dt.Rows[0];
                        admin = new adminInfo
                        {
                            ID        = Convert.ToInt16(r["id"]),
                            CorpName  = r["CorpName"].ToString(),
                            LoginName = r["LoginName"].ToString(),
                            Limits    = r["limits"].ToString(),
                            RoleID    = Convert.ToInt16(r["RoleID"]),
                            Mobile    = r["mobile"].ToString(),
                            Memo      = r["memo"].ToString(),
                            Contact   = r["Contact"].ToString(),
                            Enable    = Convert.ToInt16(r["enable"]),
                            Account   = Convert.ToInt32(r["Account"]),
                            AddOn     = Convert.ToDateTime(r["addOn"])
                        };
                        if (Dic.ContainsKey(admin.ID))
                        {
                            admin.channelSet = Dic[admin.ID];
                            if (DicC.ContainsKey(admin.channelSet.ChannelID))
                            {
                                admin.channel = DicC[admin.channelSet.ChannelID];
                            }
                        }
                    }
                }
            }
            catch
            {
            }
            return(admin);
        }
Exemplo n.º 3
0
        /// <summary>
        /// 获取列表
        /// </summary>
        /// <param name="isService"></param>
        /// <param name="workNo"></param>
        /// <returns></returns>
        public List <adminInfo> GetAdminUserList(string sql)
        {
            List <adminInfo> le = null;

            using (DataTable dt = helper.GetDataTable(sql))
            {
                if (dt != null && dt.Rows.Count > 0)
                {
                    le = new List <adminInfo>();
                    Dictionary <int, smsChannelSetting> Dic  = new _SmsChannelSetting().GetSmsChannelSettingDic();
                    Dictionary <int, smsChannel>        DicC = new _SmsChannel().GetSmsChannelDic();
                    foreach (DataRow r in dt.Rows)
                    {
                        adminInfo e = new adminInfo
                        {
                            ID        = Convert.ToInt16(r["id"]),
                            CorpName  = r["CorpName"].ToString(),
                            LoginName = r["LoginName"].ToString(),
                            Limits    = r["limits"].ToString(),
                            RoleID    = Convert.ToInt16(r["RoleID"]),
                            Mobile    = r["mobile"].ToString(),
                            Memo      = r["memo"].ToString(),
                            Contact   = r["Contact"].ToString(),
                            Enable    = Convert.ToInt16(r["enable"]),
                            Account   = Convert.ToInt32(r["Account"]),
                            AddOn     = Convert.ToDateTime(r["addOn"])
                        };
                        if (Dic.ContainsKey(e.ID))
                        {
                            e.channelSet = Dic[e.ID];
                            if (DicC.ContainsKey(e.channelSet.ChannelID))
                            {
                                e.channel = DicC[e.channelSet.ChannelID];
                            }
                        }
                        le.Add(e);
                    }
                }
            }
            return(le);
        }
Exemplo n.º 4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            starweibo.BLL.adminInfo          bllAdmin = new adminInfo();
            List <starweibo.Model.adminInfo> admins   = bllAdmin.GetModelList("1=1");

            this.rtpadminList.DataSource = admins;
            this.rtpadminList.DataBind();

            starweibo.BLL.blogInfo          bllblogInfo = new blogInfo();
            List <starweibo.Model.blogInfo> blogInfos   = bllblogInfo.GetModelList("1=1");

            this.rptblogInfoList.DataSource = blogInfos;
            this.rptblogInfoList.DataBind();

            starweibo.BLL.chatInfo          bllchatInfo = new chatInfo();
            List <starweibo.Model.chatInfo> chatInfos   = bllchatInfo.GetModelList("1=1");

            this.rptchatInfoList.DataSource = chatInfos;
            this.rptchatInfoList.DataBind();

            starweibo.BLL.messageInfo          bllmessageInfo = new messageInfo();
            List <starweibo.Model.messageInfo> messageInfos   = bllmessageInfo.GetModelList("1=1");

            this.rptmessageInfoList.DataSource = messageInfos;
            this.rptmessageInfoList.DataBind();

            starweibo.BLL.photoGroupInfo          bllphotoGroupInfo = new photoGroupInfo();
            List <starweibo.Model.photoGroupInfo> photoGroupInfos   = bllphotoGroupInfo.GetModelList("1=1");

            this.rptphotoGroupInfoList.DataSource = photoGroupInfos;
            this.rptphotoGroupInfoList.DataBind();

            starweibo.BLL.photos          bllphotos = new photos();
            List <starweibo.Model.photos> photoss   = bllphotos.GetModelList("1=1");

            this.rptphotosList.DataSource = photoss;
            this.rptphotosList.DataBind();

            starweibo.BLL.powerInfo          bllpowerInfo = new powerInfo();
            List <starweibo.Model.powerInfo> powerInfos   = bllpowerInfo.GetModelList("1=1");

            this.rptpowerInfoList.DataSource = powerInfos;
            this.rptpowerInfoList.DataBind();

            starweibo.BLL.relationGroupInfo          bllrelationGroupInfo = new relationGroupInfo();
            List <starweibo.Model.relationGroupInfo> relationGroupInfos   = bllrelationGroupInfo.GetModelList("1=1");

            this.rptrelationGroupInfoList.DataSource = relationGroupInfos;
            this.rptrelationGroupInfoList.DataBind();

            starweibo.BLL.relationInfo          bllrelationInfo = new relationInfo();
            List <starweibo.Model.relationInfo> relationInfos   = bllrelationInfo.GetModelList("1=1");

            this.rptrelationInfoList.DataSource = relationInfos;
            this.rptrelationInfoList.DataBind();

            starweibo.BLL.typeDic          blltypeDic = new typeDic();
            List <starweibo.Model.typeDic> typeDics   = blltypeDic.GetModelList("1=1");

            this.rpttypeDicList.DataSource = typeDics;
            this.rpttypeDicList.DataBind();

            starweibo.BLL.userInfo          blluserInfo = new userInfo();
            List <starweibo.Model.userInfo> userInfos   = blluserInfo.GetModelList("1=1");

            this.rptuserInfoList.DataSource = userInfos;
            this.rptuserInfoList.DataBind();


            starweibo.BLL.atV          bllAtV = new atV();
            List <starweibo.Model.atV> atVs   = bllAtV.GetModelList("1=1");

            this.rtpatVList.DataSource = atVs;
            this.rtpatVList.DataBind();

            starweibo.BLL.chatV          bllchatV = new chatV();
            List <starweibo.Model.chatV> chatVs   = bllchatV.GetModelList("1=1");

            this.rtpchatVList.DataSource = chatVs;
            this.rtpchatVList.DataBind();

            starweibo.BLL.CollectionV          bllCollectionV = new CollectionV();
            List <starweibo.Model.CollectionV> CollectionVs   = bllCollectionV.GetModelList("1=1");

            this.rtpCollectionVList.DataSource = CollectionVs;
            this.rtpCollectionVList.DataBind();

            starweibo.BLL.focusV          bllfocusV = new focusV();
            List <starweibo.Model.focusV> focusVs   = bllfocusV.GetModelList("1=1");

            this.rtpfocusVList.DataSource = focusVs;
            this.rtpfocusVList.DataBind();

            starweibo.BLL.replyV          bllreplyV = new replyV();
            List <starweibo.Model.replyV> replyVs   = bllreplyV.GetModelList("1=1");

            this.rtpreplyVList.DataSource = replyVs;
            this.rtpreplyVList.DataBind();

            starweibo.BLL.reportV          bllreportV = new reportV();
            List <starweibo.Model.reportV> reportVs   = bllreportV.GetModelList("1=1");

            this.rtpreportVList.DataSource = reportVs;
            this.rtpreportVList.DataBind();

            starweibo.BLL.zanV          bllzanV = new zanV();
            List <starweibo.Model.zanV> zanVs   = bllzanV.GetModelList("1=1");

            this.rtpzanVList.DataSource = zanVs;
            this.rtpzanVList.DataBind();
        }