コード例 #1
0
        /// <summary>
        /// Gather the values of the prompted columns.
        /// </summary>
        /// <param name="InPanel"></param>
        /// <returns></returns>
        private AcNamedValues GatherColumnValues(AcTable InPanel)
        {
            AcNamedValues ht = new AcNamedValues( );

            foreach (AcTableRow row in InPanel.Controls)
            {
                if (row.Controls.Count == 2)
                {
                    AcTableCell cell00 = (AcTableCell)row.Controls[0];
                    AcTableCell cell01 = (AcTableCell)row.Controls[1];
                    if (cell01.Controls.Count == 1)
                    {
                        string  columnValue  = null;
                        string  columnName   = cell00.Text;
                        Control entryControl = cell01.Controls[0];
                        if (entryControl is TextBox)
                        {
                            TextBox tb = (TextBox)entryControl;
                            columnValue = tb.Text;
                        }
                        else
                        {
                            DropDownList ddl = (DropDownList)entryControl;
                            columnValue = ddl.SelectedValue;
                        }
                        ht.Add(columnName, columnValue);
                    }
                }
            }
            return(ht);
        }
コード例 #2
0
        private Hashtable GatherColumnInput(AcTable InPanel)
        {
            Hashtable ht = new Hashtable( );

            foreach (AcTableRow row in InPanel.Controls)
            {
                if (row.Controls.Count == 2)
                {
                    AcTableCell cell00 = (AcTableCell)row.Controls[0];
                    AcTableCell cell01 = (AcTableCell)row.Controls[1];
                    if (cell01.Controls.Count == 1)
                    {
                        TextBox tb          = (TextBox)cell01.Controls[0];
                        string  ColumnName  = cell00.Text;
                        string  ColumnValue = tb.Text;
                        ht.Add(ColumnName, ColumnValue);
                    }
                }
            }
            return(ht);
        }