后台数据管理
来源:互联网 发布:网络教育本科怎么报名 编辑:程序博客网 时间:2024/06/05 09:20
#region 全选
protected void cbAll_CheckedChanged(object sender, EventArgs e)
{
foreach (RepeaterItem item in rptList.Items)
{
CheckBox cb = item.FindControl("cbItems") as CheckBox;
cb.Checked = cbAll.Checked;
}
}
#endregion
#region 删除
protected void btnDel_Click(object sender, EventArgs e)
{
string ids = "";
foreach (RepeaterItem item in rptList.Items)
{
CheckBox cb = item.FindControl("cbItems") as CheckBox;
if (cb.Checked)
{
ids = ids + cb.ToolTip + ",";
}
}
ids = ids.TrimEnd(',');
if (string.IsNullOrWhiteSpace(ids))
{
HtmlCommon.ShowMsg("请选择您要删除的数据");
return;
}
else
{
string[] strArry = ids.Split(',');
BLL.QuestionBLL Bll = new BLL.QuestionBLL();
int result = Bll.DeleteByIDs(strArry);
if (result > 0)
{
HtmlCommon.ShowMsg("删除成功!", "dept.aspx");
}
else
{
HtmlCommon.ShowMsg("删除失败!");
}
}
}
#endregion
protected void cbAll_CheckedChanged(object sender, EventArgs e)
{
foreach (RepeaterItem item in rptList.Items)
{
CheckBox cb = item.FindControl("cbItems") as CheckBox;
cb.Checked = cbAll.Checked;
}
}
#endregion
#region 删除
protected void btnDel_Click(object sender, EventArgs e)
{
string ids = "";
foreach (RepeaterItem item in rptList.Items)
{
CheckBox cb = item.FindControl("cbItems") as CheckBox;
if (cb.Checked)
{
ids = ids + cb.ToolTip + ",";
}
}
ids = ids.TrimEnd(',');
if (string.IsNullOrWhiteSpace(ids))
{
HtmlCommon.ShowMsg("请选择您要删除的数据");
return;
}
else
{
string[] strArry = ids.Split(',');
BLL.QuestionBLL Bll = new BLL.QuestionBLL();
int result = Bll.DeleteByIDs(strArry);
if (result > 0)
{
HtmlCommon.ShowMsg("删除成功!", "dept.aspx");
}
else
{
HtmlCommon.ShowMsg("删除失败!");
}
}
}
#endregion
0 0
- 后台数据管理
- GAE存储的数据的数据管理后台
- 数据管理
- 数据管理
- oracle 数据管理
- MES数据管理
- 静态数据管理
- 元数据管理
- 对数据管理
- Unity 数据管理
- web数据管理
- Unity 数据管理
- oracle数据管理
- Unity 数据管理
- 数据管理策略
- 学生数据管理
- 元数据管理
- CoreData 数据管理
- 各种Map的特点
- 封装原生的文件上传类
- 小熊仔要开启奔跑之旅啦
- static关键字所导致的内存泄漏问题
- poj--3249 Test for Job(topsort + dp)
- 后台数据管理
- ARM里存储器的组织结构
- HttpUrlConnection解析Xml
- 高可用集群
- 赛码解题报告(五)
- android开发笔记
- Android之Launcher分析和修改5——HotSeat分析
- 《c和指针》(四)
- 网@上@信@息@提@取