Exemplo n.º 1
0
        //public override void PrintObject()
        //{
        //}

        //#endregion

        //#region Buttons

        //protected override void PrintAction()
        //{
        //    switch (TabControl.SelectedTab.Name)
        //    {
        //        case "General_TP":
        //            {
        //                PrintObject();
        //            } break;

        //        default:
        //            {
        //                PrintSelectSkinForm psform = new PrintSelectSkinForm(true);
        //                psform.EnableDetail(false);
        //                psform.ShowDialog();
        //                if (psform.DialogResult == DialogResult.Cancel) return;

        //                switch (TabControl.SelectedTab.Name)
        //                {
        //                    case "Redes_TP":
        //                        {
        //                            PrintData(Entidad.Red, psform.Source, psform.Type);
        //                        } break;

        //                }
        //            } break;
        //    }
        //}

        #endregion

        #region Buttons

        #endregion

        #region Events

        private void Material_Grid_CellValueChanged(object sender, DataGridViewCellEventArgs e)
        {
            if (Material_Grid.Columns[e.ColumnIndex].Name == "Material_CBC" && Datos_MaterialesD.Current != null && ((ComboBoxSource)
                                                                                                                     Datos_MaterialesD.Current).Oid > 0)
            {
                if (Material_Grid["Material_CBC", e.RowIndex].Value != null)
                {
                    //se está modificando una línea ya existente
                    if (lista_sources.Count > e.RowIndex)
                    {
                        lista_sources[e.RowIndex] = _combo_materiales.GetFilteredChilds(((ComboBoxSource)Datos_MaterialesD.Current).Oid);
                    }
                    else //hay que añadir un nuevo datasource a la lista
                    {
                        lista_sources.Add(_combo_materiales.GetFilteredChilds(((ComboBoxSource)Datos_MaterialesD.Current).Oid));
                    }
                    ((DataGridViewComboBoxCell)(Material_Grid["Version_CBC", e.RowIndex])).DataSource = lista_sources[e.RowIndex];
                }
            }
            if (Material_Grid.Columns[e.ColumnIndex].Name == "Version_CBC")
            {
                Material_Plan        info     = (Material_Plan)Material_Grid.Rows[e.RowIndex].DataBoundItem;
                RevisionMaterialInfo revision = RevisionMaterialList.GetList(false).GetItem(info.OidRevision);
                if (info.OidRevision != 0)
                {
                    Material_Grid["Autor", e.RowIndex].Value = revision.Autor;
                }
            }
        }
Exemplo n.º 2
0
        public override void RefreshSecondaryData()
        {
            MaterialDocenteList materiales = MaterialDocenteList.GetList(false);

            _combo_materiales = new Library.Instruction.HComboBoxSourceList(materiales);

            Datos_MaterialesD.DataSource = _combo_materiales;
            PgMng.Grow();

            _revisiones = RevisionMaterialList.GetList(false);
            _combo_materiales.Childs = new Library.Instruction.HComboBoxSourceList(_revisiones);

            Datos_Versiones.DataSource = _combo_materiales.Childs;
            PgMng.Grow();
        }