复制代码 代码如下:
/// <summary>
/// 删除
/// </summary>
/// <param></param>
/// <param></param>
///
[AjaxMethod]
public void onDeleteClick()
{
Coolite.Ext.Web.CheckboxSelectionModel rsm = GridPanel1.SelectionModel.Primary as Coolite.Ext.Web.CheckboxSelectionModel;
int count = 0;
foreach (Coolite.Ext.Web.SelectedRow sm in rsm.SelectedRows)
{
count = user.DeleteCompanyUser(int.Parse(sm.RecordID));
}
if (count > 0)
{
Ext.MessageBox.Alert("提示", "删除成功").Show();
}
else
{
Ext.MessageBox.Alert("提示", "删除失败,没有选中行!" ).Show();
}
BindStore();
}
/// <summary>
/// 弹出删除对话框
/// </summary>
[AjaxMethod]
public void DoConfirm()
{
Ext.Msg.Confirm("消息提示", "是否删除选中行?", new MessageBox.ButtonsConfig
{
Yes = new MessageBox.ButtonConfig
{
Handler = "CompanyUser.onDeleteClick()",
Text = "是"
},
No = new MessageBox.ButtonConfig
{
Text = "否"
}
}).Show();
}
新闻热点
疑难解答
图片精选