Example #1
0
    protected void show_member(object sender, CommandEventArgs e)
    {
        this.U_insertMember1.Visible = false;
        this.U_Member1.Visible       = true;
        UseFunc uf = new UseFunc();

        this.U_Member1.member = uf.GetMembers(int.Parse(e.CommandName.ToString()));
    }
Example #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        UseFunc uf     = new UseFunc();
        News    mynews = uf.GetNews(int.Parse(Session["newsid"].ToString()));

        this.Label_newstitle.Text  = mynews.Title;
        this.Label_newsauthor.Text = "作者:" + uf.GetMembers(mynews.Mid).Name;
        this.Label_time.Text       = "时间:" + mynews.Datetime;
        //this.Label_newscontext.Text = huanhang(mynews.Context);
        this.Label_newscontext.Text = mynews.Context.Replace("\r\n", "<br> ");
    }
Example #3
0
    protected void Button_search_Click(object sender, EventArgs e)//tangniuzi
    {
        IList <Members> memberlist = new List <Members>();
        UseFunc         uf         = new UseFunc();

        if (this.TextBox_key.Text == "")
        {
            memberlist = uf.GetMembers(true);
        }
        else
        {
            memberlist = uf.GetMembersList(this.TextBox_key.Text);
        }
        bindlist(memberlist);
    }
Example #4
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         IList <Area> list = new List <Area>();
         Members      my   = eu.GetMembers(int.Parse(Session["Userid"].ToString()));
         if (my.Type == 0)
         {
             list = sf.GetAreaList();
         }
         else
         {
             Area area = sf.GetArea(my.Type);
             list.Add(area);
         }
         bind(list);
     }
 }
Example #5
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Session["Type"] == null)
     {
         Response.Write("<script language='javascript'>alert('连接超时,请重新登录.'); location.href='Loginpage.aspx'</script>");
     }
     if (int.Parse(Session["Type"].ToString()) != 0)
     {
         Response.Write("<script language='javascript'>alert('该账号无此操作权限.'); location.href='HomePage.aspx'</script>");
     }
     if (!IsPostBack)
     {
         this.U_insertMember1.Visible = false;
         this.U_Member1.Visible       = false;
         UseFunc         uf    = new UseFunc();
         IList <Members> mlist = uf.GetMembers(true);
         bindlist(mlist);
     }
 }
Example #6
0
    protected void Button_submit_Click(object sender, EventArgs e)
    {
        if (this.TextBox_newpw.Text != this.TextBox_checkpw.Text)
        {
            this.Label_result.Text = "两次输入密码不一致,请重新输入。";
            return;
        }
        UseFunc uf  = new UseFunc();
        Members mbs = uf.GetMembers(int.Parse(Session["Userid"].ToString()));

        if (md5.Md5Encode(this.TextBox_oldpw.Text) != mbs.Password)
        {
            this.Label_result.Text = "原始密码错误,请重新输入。";
            return;
        }
        ExcFunc euf    = new ExcFunc();
        int     result = euf.Editmembers(member, int.Parse(Session["Userid"].ToString()));

        if (result != 0)
        {
            Response.Write("<script language='javascript'>alert('密码更改成功,请重新登录。'); location.href='LoginOut.aspx'</script>");
        }
    }
Example #7
0
 protected void Page_Load(object sender, EventArgs e)
 {
     UseFunc         uf      = new UseFunc();
     IList <Members> members = uf.GetMembers(true);
     //bind(members);
 }
Example #8
0
        /// <summary>
        /// 获取可见大楼信息
        /// </summary>
        /// <param name="mb">用户信息</param>
        /// <returns></returns>
        public IList <LanData> getbuildings(string mid)
        {
            SysFunc         sf          = new SysFunc();
            UseFunc         uf          = new UseFunc();
            Members         mb          = uf.GetMembers(int.Parse(mid));
            IList <LanData> landatalist = new List <LanData>();

            if (mb.Type == 0)  // 超级权限
            {
                landatalist = uf.GetLandataList();
            }
            else if (mb.Type == 1)
            {
                Area curArea = sf.GetArea((short)sf.GetFireManage((short)mb.LinkId).Aid);
                if (curArea.Type == true)
                {
                    IList <Area> areas = sf.GetAreaList(curArea.Cid, false);
                    for (int i = 0; i < areas.Count; i++)
                    {
                        IList <LanData> tmp = uf.GetLandataList(areas[i].ID);
                        for (int j = 0; j < tmp.Count; j++)
                        {
                            landatalist.Add(tmp[j]);
                        }
                    }
                }
                else
                {
                    landatalist = uf.GetLandataList(curArea.ID);
                }
            }
            else if (mb.Type == 2)
            {
                Area curArea = sf.GetArea((short)sf.GetFireHouse((short)mb.LinkId).Aid);
                if (curArea.Type == true)
                {
                    IList <Area> areas = sf.GetAreaList(curArea.Cid, false);
                    for (int i = 0; i < areas.Count; i++)
                    {
                        IList <LanData> tmp = uf.GetLandataList(areas[i].ID);
                        for (int j = 0; j < tmp.Count; j++)
                        {
                            landatalist.Add(tmp[j]);
                        }
                    }
                }
                else
                {
                    landatalist = uf.GetLandataList(curArea.ID);
                }
            }
            else if (mb.Type == 3)
            {
                Area curArea = sf.GetArea((short)sf.GetControlCenter((short)mb.LinkId).Aid);
                if (curArea.Type == true)
                {
                    IList <Area> areas = sf.GetAreaList(curArea.Cid, false);
                    for (int i = 0; i < areas.Count; i++)
                    {
                        IList <LanData> tmp = uf.GetLandataList(areas[i].ID);
                        for (int j = 0; j < tmp.Count; j++)
                        {
                            landatalist.Add(tmp[j]);
                        }
                    }
                }
                else
                {
                    landatalist = uf.GetLandataList(curArea.ID);
                }
            }
            else if (mb.Type == 6)
            {
                landatalist.Add(uf.GetLandata((int)mb.LinkId));
            }
            else if (mb.Type == 5)
            {
                landatalist = uf.GetLandataListPt((short)mb.LinkId);
            }
            else if (mb.Type == 4)
            {
                landatalist = uf.GetLandataListMt((short)mb.LinkId);
            }
            else
            {
                landatalist = null;
            }
            return(landatalist);
        }