示例#1
0
 protected void Submit_Click(object sender, EventArgs e)
 {
     member.Name = Name.Text;
     if (Man.Checked)
     {
         member.Sex = "男";
     }
     else
     {
         member.Sex = "女";
     }
     member.Tel = Tel.Text;
     if (!PicUrl.FileName.Equals(""))
     {
         if (Comment.SaveImg(PicUrl, MapPath("~/FrontState/Member/HeadImg"), member.QQ))
         {
             int    index       = PicUrl.FileName.LastIndexOf(".");
             string picLastName = PicUrl.FileName.Substring(index);
             member.UserPic = MapPath("~/FrontState/Member/HeadImg") + "/" + member.QQ + picLastName;
         }
     }
     DAL.DMember info = new DAL.DMember();
     if (info.Update(member))
     {
         Response.Write("<script language='javascript'>alert('修改成功!')</script>");
         Cancel_Click(sender, e);
     }
     else
     {
         Response.Write("<script language='javascript'>alert('修改失败!')</script>");
         member = info.GetMemberByQQ(member.QQ);
     }
 }
示例#2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        string qq = Request.QueryString["qq"].ToString();

        DAL.DMember info = new DAL.DMember();
        member = info.GetMemberByQQ(qq);
    }
示例#3
0
 protected void ModifyBtn_Click(object sender, EventArgs e)
 {
     DAL.DMember DMe = new DAL.DMember();
     if (DMe.CanLogin(qq, OldPsdBox.Text))
     {
         OldPsdLbl.Text = "";
         Model.Member info = DMe.GetMemberByQQ(qq);
         if (NewPsdBox.Text.Equals(ForSureBox.Text))
         {
             info.Password   = NewPsdBox.Text;
             ForSureLbl.Text = "";
             if (DMe.Update(info))
             {
                 Response.Write("<script language='javascript'>alert('修改成功!')</script>");
             }
             else
             {
                 Response.Write("<script language='javascript'>alert('修改失败!')</script>");
             }
         }
         else
         {
             ForSureLbl.Text = "与新密码不一致";
         }
     }
     else
     {
         OldPsdLbl.Text = "密码错误!";
     }
 }
示例#4
0
    private void FillWriterInfo(string qq)
    {
        Model.Member member = new DAL.DMember().GetMemberByQQ(qq);

        name.Text = member.Name;
        QQ.Text   = qq;
        Dept.Text = member.Dept;
    }
示例#5
0
    protected void LogonBtn_Click(object sender, EventArgs e)
    {
        DAL.DMember info = new DAL.DMember();

        if (info.CanLogin(UserNameText.Value, PasswordText.Value))
        {
            Server.Transfer("MemberCenter.aspx?qq=" + UserNameText.Value);
        }
        else
        {
            Response.Write("<script language='javascript'>alert('用户名或密码不正确!')</script>");
        }
        //}
    }
示例#6
0
    private void GetInfo(string qq)
    {
        Model.Notice notice = new DAL.DNotice().Getnewtime();
        if (notice.Info.Length > 150)
        {
            NoticeHTML.InnerHtml = notice.Info.Substring(0, 149);
        }
        else
        {
            NoticeHTML.InnerHtml = notice.Info;
        }

        DAL.DMember info = new DAL.DMember();
        member    = info.GetMemberByQQ(qq);
        name.Text = member.Name;
        QQ.Text   = qq;
        char[] spit = new char[] { '>' };
        Dept.Text = member.Dept.Split(spit)[1];
        GreatArticleList.DataSource = new DAL.DArticle().GetArticleByTitleAndTypeAndIsImportant("", "", 1);
        GreatArticleList.DataBind();
    }
示例#7
0
    private void DataListBind()
    {
        string type = GetMemberType();
        int    year = GetYear();
        string name = GetName();

        DAL.DMember list = new DAL.DMember();
        if (type.Equals(""))
        {
            ManagerList.DataSource = list.GetMemberByManyInfo("", "主管", name, year);
            ManagerList.DataBind();
            AndroiderList.DataSource = list.GetMemberByManyInfo(type + "%Android", "", name, year);
            AndroiderList.DataBind();
            ASPNETerList.DataSource = list.GetMemberByManyInfo(type + "%.NET", "", name, year);
            ASPNETerList.DataBind();
            PHPerList.DataSource = list.GetMemberByManyInfo(type + "%PHP", "", name, year);
            PHPerList.DataBind();
            JavaerList.DataSource = list.GetMemberByManyInfo(type + "%JAVA", "", name, year);
            JavaerList.DataBind();
            PSerList.DataSource = list.GetMemberByManyInfo(type + "%美工", "", name, year);
            PSerList.DataBind();
            UIerList.DataSource = list.GetMemberByManyInfo(type + "%UI", "", name, year);
            UIerList.DataBind();
            TesterList.DataSource = list.GetMemberByManyInfo("测试", "", name, year);
            TesterList.DataBind();
        }
        if (type.Contains("主管"))
        {
            ManagerList.DataSource = list.GetMemberByManyInfo("", "主管", name, year);
            ManagerList.DataBind();
            AndroiderList.DataSource = null;
            AndroiderList.DataBind();
            ASPNETerList.DataSource = null;
            ASPNETerList.DataBind();
            PHPerList.DataSource = null;
            PHPerList.DataBind();
            JavaerList.DataSource = null;
            JavaerList.DataBind();
            PSerList.DataSource = null;
            PSerList.DataBind();
            UIerList.DataSource = null;
            UIerList.DataBind();
            TesterList.DataSource = null;
            TesterList.DataBind();
        }
        if (type.Contains("开发"))
        {
            ManagerList.DataSource = null;
            ManagerList.DataBind();
            AndroiderList.DataSource = list.GetMemberByManyInfo(type + "%Android", "", name, year);
            AndroiderList.DataBind();
            ASPNETerList.DataSource = list.GetMemberByManyInfo(type + "%.NET", "", name, year);
            ASPNETerList.DataBind();
            PHPerList.DataSource = list.GetMemberByManyInfo(type + "%PHP", "", name, year);
            PHPerList.DataBind();
            JavaerList.DataSource = list.GetMemberByManyInfo(type + "%JAVA", "", name, year);
            JavaerList.DataBind();
            PSerList.DataSource = null;
            PSerList.DataBind();
            UIerList.DataSource = null;
            UIerList.DataBind();
            TesterList.DataSource = null;
            TesterList.DataBind();
        }
        if (type.Contains("特效"))
        {
            ManagerList.DataSource = null;
            ManagerList.DataBind();
            AndroiderList.DataSource = null;
            AndroiderList.DataBind();
            ASPNETerList.DataSource = null;
            ASPNETerList.DataBind();
            PHPerList.DataSource = null;
            PHPerList.DataBind();
            JavaerList.DataSource = null;
            JavaerList.DataBind();
            PSerList.DataSource = list.GetMemberByManyInfo(type + "%美工", "", name, year);
            PSerList.DataBind();
            UIerList.DataSource = list.GetMemberByManyInfo(type + "%UI", "", name, year);
            UIerList.DataBind();
            TesterList.DataSource = list.GetMemberByManyInfo("测试", "", name, year);
            TesterList.DataBind();
        }
        if (type.Contains("测试"))
        {
            ManagerList.DataSource = null;
            ManagerList.DataBind();
            AndroiderList.DataSource = null;
            AndroiderList.DataBind();
            ASPNETerList.DataSource = null;
            ASPNETerList.DataBind();
            PHPerList.DataSource = null;
            PHPerList.DataBind();
            JavaerList.DataSource = null;
            JavaerList.DataBind();
            PSerList.DataSource = null;
            PSerList.DataBind();
            UIerList.DataSource = null;
            UIerList.DataBind();
            TesterList.DataSource = list.GetMemberByManyInfo("测试", "", name, year);
            TesterList.DataBind();
        }
    }