Exemplo n.º 1
0
        private void dgvDatos_BeforeRowsDeleted(object sender, Infragistics.Win.UltraWinGrid.BeforeRowsDeletedEventArgs e)
        {
            try
            {
                foreach (Infragistics.Win.UltraWinGrid.UltraGridRow item in e.Rows)
                {
                    using (SqlConnection connection = new SqlConnection(ClasesSGUV.Propiedades.conectionLog))
                    {
                        using (SqlCommand command = new SqlCommand())
                        {
                            command.Connection = connection;

                            command.CommandText = @"Delete From tbl_TarimaTraspaso Where IdTarima = @id AND NumTraspaso = @traspaso";
                            command.Parameters.AddWithValue("@id", ID);
                            command.Parameters.AddWithValue("@traspaso", item.Cells["Traspaso"].Value);

                            connection.Open();

                            command.ExecuteNonQuery();
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
        }
Exemplo n.º 2
0
        private void dgvDatos_BeforeRowsDeleted(object sender, Infragistics.Win.UltraWinGrid.BeforeRowsDeletedEventArgs e)
        {
            DialogResult result = MessageBox.Show("Va a eliminar " + dgvDatos.Selected.Rows.Count.ToString() + " facturas, seguro que desea continuar?", "Confirmation", MessageBoxButtons.YesNoCancel);

            if (result == DialogResult.Yes)
            {
                foreach (var item in dgvDatos.Selected.Rows)
                {
                    if (item.Cells["idRelacion"].ToString() != "-1")
                    {
                        csLogistica.EliminaRelacionFactura(11, Convert.ToInt32(item.Cells["idRelacion"].Value));
                    }
                }
            }
            e.DisplayPromptMsg = false;
        }
Exemplo n.º 3
0
 private void dgvDatos_BeforeRowsDeleted(object sender, Infragistics.Win.UltraWinGrid.BeforeRowsDeletedEventArgs e)
 {
     e.DisplayPromptMsg = false;
     e.Cancel           = true;
 }
Exemplo n.º 4
0
 private void ugdIzvodi_BeforeRowsDeleted(object sender, Infragistics.Win.UltraWinGrid.BeforeRowsDeletedEventArgs e)
 {
     e.DisplayPromptMsg = false;
 }