コード例 #1
0
        /// <summary>
        /// IsTableAllColumnHasRelativePascalForm
        /// </summary>
        /// <param name="tableName"></param>
        /// <returns></returns>
        private bool isPascalComplete(string tableName)
        {
            DataTable dtColumns = ColumnControl.GetTableColumnsByTableName(tableName, dbType);
            bool      isAllColumnHasRelativePascalForm = ColumnControl.GetColRelaPascalName(dtColumns); //get relative pascal Columns

            if (this.rbPascal.Checked && !isAllColumnHasRelativePascalForm)
            {
                MessageBox.Show(ConstantUtil.NoRelaPascalCol);
                return(false);
            }
            return(true);
        }
コード例 #2
0
        private void dgvDataTables_CellMouseClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            if (e.RowIndex == -1 || e.ColumnIndex == -1)
            {
                return;
            }

            DataTable dtColumns = ColumnControl.GetColumnAndPascalNameFromXml(
                this.dgvDataTables.Rows[e.RowIndex].Cells["Table_Name"].Value.ToString(), dbType);

            this.dgvColumns.DataSource          = dtColumns;
            this.dgvColumns.AutoGenerateColumns = false;
        }
コード例 #3
0
        private void ItemsColumn_OneItemSelected(object sender, ListViewItem e)
        {
            ColumnControl      c    = sender as ColumnControl;
            ColumnListViewItem item = e as ColumnListViewItem;

            if (item.SubColumn == null)
            {
                return;
            }

            // Don't add existing column
            int i = this.Columns.IndexOf(c);

            if (this.Columns.Count > i + 1 &&
                (this.Columns[i + 1] as ItemsColumn).ItemsPath == item.SubColumn.Path)
            {
                return;
            }

            // Remove columns on the right
            int residueCount = this.Columns.Count - i - 1;
            int width        = residueCount > 0 ? this.Columns[i + 1].Width : this.DefaultColumnWidth;

            this.ScrollPanel.SuspendLayout();

            UpdateScrollMinSize();

            for (int j = 1; j <= residueCount; j++)
            {
                this.Columns.RemoveAt(i + 1);
            }

            if (c.ListViewControl.SelectedItems.Count == 1)
            {
                // Add new column
                ItemsColumn column = Packages.InstantiateColumn(item.SubColumn, Host);

                this.Columns.Add(column);
                column.Width = width;
                this.ScrollPanel.ResumeLayout();
                if (SubColumnAdded != null)
                {
                    SubColumnAdded(this, column);
                }
            }
            else
            {
                this.ScrollPanel.ResumeLayout();
            }
        }
コード例 #4
0
 private void Awake()
 {
     instance = this;
 }
コード例 #5
0
        public async Task <ColumnControl> Update(ColumnControl columnControl)
        {
            var columnUpdate = await _columnControlRepository.Update(columnControl);

            return(columnUpdate);
        }
コード例 #6
0
        public async Task <IActionResult> Put([FromBody] ColumnControl columnControl)
        {
            var entity = await _columnControlService.Update(columnControl);

            return(Ok(entity));
        }
コード例 #7
0
        public async Task <IActionResult> Post([FromBody] ColumnControl columnControl)
        {
            var control = await _columnControlService.Create(columnControl);

            return(Ok(control));
        }