时间:2021-07-01 10:21:17 帮助过:13人阅读
/// <summary>
/// 删除
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></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();
}
就OK 了