Esempio n. 1
0
        private void Clases_Grid_UserDeletingRow(object sender, DataGridViewRowCancelEventArgs e)
        {
            if (this is PlanAnualViewForm)
            {
                return;
            }

            long oid_plan_tipo = ((Plan_Tipo)e.Row.DataBoundItem).Oid;

            //Eliminamos el datasource asociado
            if (_source_list.CombosListCount > e.Row.Index)
            {
                _source_list.DeleteCombosList(e.Row.Index);
            }

            SetUnlinkedGridValues(Clases_Grid.Name);
        }
Esempio n. 2
0
        private void Clases_Grid_UserDeletingRow(object sender, DataGridViewRowCancelEventArgs e)
        {
            if (this is PlanExtraViewForm)
            {
                return;
            }

            long oid_clase = ((ClaseExtra)e.Row.DataBoundItem).Oid;

            //comprueba que no haya ningún horario que incluya esta clase
            if (oid_clase == -1 || ClaseExtra.SesionExists(oid_clase))
            {
                MessageBox.Show(Resources.Messages.CLASE_ASIGNADA);
                e.Cancel = true;
            }
            else
            {
                //Eliminamos el datasource asociado
                if (_source_list.CombosListCount > e.Row.Index)
                {
                    _source_list.DeleteCombosList(e.Row.Index);
                }
            }
        }