Пример #1
0
 public void updateRow(DataSets.dsModuleStructure3.dtActionValueTypeRow updateRow)
 {
     try
     {
         ta_bbt_action_value_type.Update(updateRow);
     }
     catch (Exception ex)
     {
         MessageBox.Show("Invalid action type, try again !",
                         "Error !",
                         MessageBoxButtons.OK,
                         MessageBoxIcon.Error);
         dsModuleStructureGUI.RejectChanges();
     }
 }
Пример #2
0
        public void createModuleTypeActionTypeRow()
        {
            DataSets.dsModuleStructure3.dtModuleTypeActionTypeRow row                = dsModuleStructureGUI.dtModuleTypeActionType.NewdtModuleTypeActionTypeRow();
            DataSets.dsModuleStructure3.dtActionTypeRow           actionTypeRow      = getSelectedActionTypeRow();
            DataSets.dsModuleStructure3.dtModuleTypeRow           moduleTypeRow      = getSelectedModuleTypeRow();
            DataSets.dsModuleStructure3.dtActionValueTypeRow      actionValueTypeRow = getSelectedActionValueTypeRow();

            if (actionTypeRow == null || moduleTypeRow == null || actionValueTypeRow == null)
            {
                return;
            }

            row.fk_action_type_id       = actionTypeRow.pk_id;
            row.fk_module_type_id       = moduleTypeRow.pk_id;
            row.fk_action_value_type_id = actionValueTypeRow.pk_id;
            dsModuleStructureGUI.dtModuleTypeActionType.AdddtModuleTypeActionTypeRow(row);
            dsModuleStructureGUI.dtActionType.DefaultView.RowFilter = String.Empty;
            updateRow(row);
        }
Пример #3
0
        private void crudOptions_ModifyClickHandler(object sender, EventArgs e)
        {
            abstractDialog dialog = new abstractDialog("Action type", "Modify");

            DataSets.dsModuleStructure3.dtActionValueTypeRow row = getSelectedRow();

            if (row == null)
            {
                return;
            }

            namedInputTextBox description = new namedInputTextBox("Description", row.description);

            dialog.addNamedInputTextBox(description);

            dialog.ShowDialog();

            if (dialog.DialogResult.Equals(DialogResult.OK))
            {
                row.description = description.getInputTextValue();
                updateRow(row);
            }
        }