示例#1
0
        /// <summary>
        ///		Abre el formulario de modificación de instrucciones
        /// </summary>
        private void OpenFormUpdateInstruction(string strKey)
        {
            frmInstruction frmNewInstruction = new frmInstruction();

            // Asigna las propiedades
            frmNewInstruction.Instruction = objProject.Instructions[strKey];
            // Muestra el formulario
            frmNewInstruction.ShowDialog();
            // Guarda los datos
            if (frmNewInstruction.DialogResult == System.Windows.Forms.DialogResult.OK)
            {                                     // Asigna la instrucción
                if (strKey.IsEmpty())
                {
                    objProject.Instructions.Add(frmNewInstruction.Instruction);
                }
                else
                {
                    objProject.Instructions[strKey] = frmNewInstruction.Instruction;
                }
                // Actualiza la lista
                LoadListInstructions();
            }
        }
示例#2
0
        /// <summary>
        ///		Abre el formulario de modificación de instrucciones
        /// </summary>
        private void OpenFormUpdateInstruction(string strKey)
        {
            frmInstruction frmNewInstruction = new frmInstruction();

                // Asigna las propiedades
                    frmNewInstruction.Instruction = objProject.Instructions[strKey];
                // Muestra el formulario
                    frmNewInstruction.ShowDialog();
                // Guarda los datos
                    if (frmNewInstruction.DialogResult == System.Windows.Forms.DialogResult.OK)
                        { // Asigna la instrucción
                                if (strKey.IsEmpty())
                                    objProject.Instructions.Add(frmNewInstruction.Instruction);
                                else
                                    objProject.Instructions[strKey] = frmNewInstruction.Instruction;
                            // Actualiza la lista
                                LoadListInstructions();
                        }
        }