Exemplo n.º 1
0
    protected void Insert_Click(object sender, EventArgs e)
    {
        Model.Member member = new Model.Member();
        member.Name = Name.Text;
        if (Man.Checked)
        {
            member.Sex = Man.Text;
        }
        else
        {
            member.Sex = Woman.Text;
        }

        member.JoinYear = Convert.ToInt32(JoinYear.Text);

        member.QQ       = QQ.Text;
        member.Password = Password.Text;
        member.Tel      = Tel.Text;
        member.Dept     = Team.Text + "<br/>" + Dept.Text;
        member.Duty     = Duty.Text;
        if (IsFinish())
        {
            member.IsFinish = 1;
        }
        else
        {
            member.IsFinish = 0;
        }



        if (info.Insert(member))
        {
            Response.Write("<script language='javascript'>alert('添加成功!')</script>");
        }
        else
        {
            Response.Write("<script language='javascript'>alert('添加失败!')</script>");
        }
        DataList1.DataSource = info.GetAll();
        DataList1.DataBind();
    }
Exemplo n.º 2
0
 public int Insert(Member m)
 {
     return(de.Insert(m));
 }