Beispiel #1
0
        protected void onBnCardTypeAdd(object sender, EventArgs e)
        {
            // add new card type
            DialogAddCardType newCardName = new DialogAddCardType();
            int iResponse = (int)newCardName.Run();

            if (iResponse == (int)ResponseType.Ok)
            {
                String newCard = newCardName.CardName;
                CardGeneratorDB.Instance.addCardType(newCard);
                RebuildCardTypeTable();
            }
            newCardName.Destroy();
        }
Beispiel #2
0
        protected void onBnAddColumn(object sender, EventArgs e)
        {
            DialogAddCardType dialog = new DialogAddCardType();

            dialog.LabelText.Text = "Enter new Column Name";

            if (dialog.Run() == (int)ResponseType.Ok)
            {
                CardGeneratorDB.Instance.addColumn(CardGeneratorDB.TABLECardData, dialog.CardName);

                List <String> columnNames = CardGeneratorDB.Instance.GetColumnNames(strTable);
                List <Dictionary <String, String> > data = CardGeneratorDB.Instance.getDataFromTable(strTable);

                BuildTableColumns(columnNames);
                BuildTable(columnNames, data);
            }
            dialog.Destroy();
        }