Exemplo n.º 1
0
 private void DeleteData(List <DataGridViewRow> selectedRows)
 {
     if (selectedRows.Count > 0)
     {
         if (UtilityMessage.Confirm(GeneralMessage.ConfirmDelete, GeneralMessage.MessageBoxTitle))
         {
             RowsEventArgs RowArg = new RowsEventArgs()
             {
                 RowsSelected = selectedRows
             };
             if (onDeleteDataRows != null)
             {
                 onDeleteDataRows(GetDeleteDataKey(selectedRows), RowArg);
                 LoadData();
                 Grid.ClearSelection();
                 UtilityMessage.Alert(GeneralMessage.DeleteComplete, GeneralMessage.MessageBoxTitle);
             }
         }
     }
     else
     {
         UtilityMessage.Warning(GeneralMessage.NoSelectedData, GeneralMessage.MessageBoxTitle);
     }
 }
Exemplo n.º 2
0
 public void grdBase_onDeleteDataRows(object sender, Control.GridView.RowsEventArgs e)
 {
     ServiceProvider.SystemConfigGroupService.Delete((List <Dictionary <string, object> >)sender);
 }
Exemplo n.º 3
0
        private void DeleteData(List<DataGridViewRow> selectedRows)
        {

            if (selectedRows.Count > 0)
            {

                if (UtilityMessage.Confirm(GeneralMessage.ConfirmDelete, GeneralMessage.MessageBoxTitle))
                {
                    RowsEventArgs RowArg = new RowsEventArgs() { RowsSelected = selectedRows };
                    if (onDeleteDataRows != null)
                    {
                        onDeleteDataRows(GetDeleteDataKey(selectedRows), RowArg);
                        LoadData();
                        Grid.ClearSelection();
                        UtilityMessage.Alert(GeneralMessage.DeleteComplete, GeneralMessage.MessageBoxTitle);
                    }
                }
            }
            else
            {
                UtilityMessage.Warning(GeneralMessage.NoSelectedData, GeneralMessage.MessageBoxTitle);
            }
        }