Exemplo n.º 1
0
    protected void DataList1_ItemCommand(object source, DataListCommandEventArgs e)
    {
        id = Convert.ToInt32(e.CommandArgument.ToString());
        info.Delete(id);

        DataList1.DataSource = info.GetAll();
        DataList1.DataBind();
    }
Exemplo n.º 2
0
        public int Delete(Member m)
        { //团队成员删除要更新文章、专著、项目关于团队成员的编号
            if (m.MemberType == MemberType.团队成员.ToString())
            {
                da.sqlUpdate(m.MemberID, "TdMember");
                dt.sqlUpdate(m.MemberID, "TdMember");
                dp.sqlUpdate(m.MemberID, "TdMember");
            }
            else
            {
                da.sqlUpdate(m.MemberID, "LmMember");
                dt.sqlUpdate(m.MemberID, "LmMember");
                dp.sqlUpdate(m.MemberID, "LmMember");
            }

            return(de.Delete(m));
        }