コード例 #1
0
        protected override void Execute(CodeActivityContext context)
        {
            try
            {
                tempTable = InputTable.Get(context);
                tempPath  = FilePath.Get(context);

                string[] words = tempPath.Split('/');

                if (words.Length <= 1)
                {
                    tempPath = Path.Combine(Environment.CurrentDirectory, tempPath);
                }

                if (string.IsNullOrEmpty(tempTable.TableName))
                {
                    tempTable.TableName = "Table1";
                }

                tempTable.WriteXml(tempPath, WriteMode);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
コード例 #2
0
        protected override void Execute(CodeActivityContext context)
        {
            try
            {
                table        = InputTable.Get(context);
                strCondition = Select.Get(context);

                if (table != null && table.Rows.Count > 0 && !string.IsNullOrEmpty(strCondition))
                {
                    filterRows = table.Select(strCondition).ToList();

                    if (filterRows != null && filterRows.Count > 0)
                    {
                        for (int intRow = 0; intRow < filterRows.Count; intRow++)
                        {
                            table.Rows.Remove(filterRows[intRow]);
                        }
                    }
                }

                Result.Set(context, table);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
コード例 #3
0
        private void SetValue(CodeActivityContext context)
        {
            this.localSourceTable = InputTable.Get(context);

            this.localNullValue = NullValue.Get(context);

            if (this.localSourceTable == null)
            {
                throw new Exception("Input table is null");
            }

            this.localGroupbyColumn = GroupbyColumns.Get(context);

            this.localAggregateColumn = AggregateColumn.Get(context);

            this.localAggregateBy = AggregateBy.ToString();

            if (AggregateType.ToString() == "Integer")
            {
                this.localAggregateColumnType = System.Type.GetType("System.Int64");
            }
            else
            {
                this.localAggregateColumnType = System.Type.GetType("System." + AggregateType.ToString());
            }
        }
コード例 #4
0
        protected override void Execute(CodeActivityContext context)
        {
            try
            {
                this.tempTable = InputTable.Get(context);

                XmlDocument xmldoc = this.GetXmlDocument();

                Document.Set(context, xmldoc);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
コード例 #5
0
ファイル: dataGridView.cs プロジェクト: Ciphix/DataGridView
        protected override void Execute(CodeActivityContext context)
        {
            DataTable inputTable = InputTable.Get(context);
            String    suffix     = Suffix.Get(context);

            this.contextGlobal = context;
            //Create the empty form

            Form form = new Form();

            form.FormClosing += new FormClosingEventHandler(Form_Closing);

            //Check if suffix is set
            if (suffix == null || suffix == "")
            {
                form.Text = "Data viewer";
            }
            else
            {
                form.Text = "Data viewer: " + suffix;
            }

            form.Controls.Add(myDataGridView);
            myDataGridView.Dock       = DockStyle.Fill;
            myDataGridView.DataSource = inputTable;

            //We make every column NotSortable
            foreach (DataGridViewColumn column in myDataGridView.Columns)
            {
                column.SortMode = DataGridViewColumnSortMode.NotSortable;
            }

            form.WindowState = FormWindowState.Maximized;
            if (ShowAsDialog.Expression == null || ShowAsDialog.Get(context))
            {
                form.ShowDialog();
            }
            else
            {
                form.Show();
            }

            form.WindowState = FormWindowState.Maximized;
            form.BringToFront();
            form.Focus();
        }
コード例 #6
0
        protected override void Execute(CodeActivityContext context)
        {
            try
            {
                this.localDataTable  = InputTable.Get(context);
                this.localColumnName = ColumnName.Get(context);
                this.localSelect     = Select.Get(context);

                this.DoCount();

                Result.Set(context, this.localOutPut);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
コード例 #7
0
        protected override void Execute(CodeActivityContext context)
        {
            try
            {
                table        = InputTable.Get(context);
                localRowList = RowCollection.Get(context);

                if (table != null && localRowList != null && localRowList.Count > 0)
                {
                    for (int introw = 0; introw < localRowList.Count; introw++)
                    {
                        table.Rows.Add(localRowList[introw].ItemArray);
                    }
                }

                Result.Set(context, table);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }