private bool DeleteByRow(Xceed.Grid.DataRow row) { GridHelper.EndEditRow(row); bool rowAllowDelete = m_grid.AllowInnerDelete && m_cm.AllowDelete && Permission.AuthorizeByRule(ADInfoBll.Instance.GetGridRowInfo(m_grid.GridName).AllowDelete, row.Tag); if (rowAllowDelete) { m_cm.DisplayManager.Position = row.Index; return(m_cm.DeleteCurrent()); } return(false); }
public static bool DoDeleteS(IControlManager cm, string gridName) { var info = ADInfoBll.Instance.GetGridRowInfo(gridName); if (info != null && !string.IsNullOrEmpty(info.AllowDelete) && !Permission.AuthorizeByRule(info.AllowDelete, cm.DisplayManager.CurrentItem)) { MessageForm.ShowError("您没有删除此记录的权限!"); return(false); } if (MessageForm.ShowYesNo("当前记录将要被删除,是否继续?", "确认", true)) { return(cm.DeleteCurrent()); } return(false); }
public static bool DoDeleteS(IControlManager cm, string gridName) { var info = ADInfoBll.Instance.GetGridRowInfo(gridName); if (info != null && !string.IsNullOrEmpty(info.AllowDelete) && !Permission.AuthorizeByRule(info.AllowDelete, cm.DisplayManager.CurrentItem)) { MessageForm.ShowError("��û��ɾ���˼�¼��Ȩ�ޣ�"); return false; } if (MessageForm.ShowYesNo("��ǰ��¼��Ҫ��ɾ�����Ƿ������", "ȷ��", true)) { return cm.DeleteCurrent(); } return false; }
/// <summary> /// btnDelete_Click /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected virtual void btnDelete_Click(System.Object sender, System.EventArgs e) { m_cm.DeleteCurrent(); }