コード例 #1
0
        private void Envelope_TableNewRow(object sender, System.Data.DataTableNewRowEventArgs e)
        {
            FFDataSet.EnvelopeRow row = e.Row as FFDataSet.EnvelopeRow;

            int max =
                (from Envelope in this.Envelope
                 select Envelope.id).Max();

            int maxP =
                (from Envelope in this.Envelope
                 select Envelope.priorityOrder).Max();


            row.id        = max + 1;
            row.name      = "";
            row.groupID   = SpclEnvelope.NULL;
            row.closed    = false;
            row.accountID = SpclAccount.NULL;

            row.priorityOrder = maxP + 1;
            row.notes         = "";
            row.step          = 0.0m;
            row.cap           = 0.0m;
            row.nextDate      = DateTime.Today;
            row.intervalDate  = DateTime.MinValue;
        }
コード例 #2
0
        private void BankInfo_TableNewRow(object sender, System.Data.DataTableNewRowEventArgs e)
        {
            FFDataSet.BankInfoRow row = e.Row as FFDataSet.BankInfoRow;

            // account id needs to be set by the funcion getting the new line.  row.accountID = SpclAccount.NULL;
            row.bankID        = SpclBank.NULL;
            row.accountNumber = "";
            row.creditDebit   = LineCD.DEBIT;
        }
コード例 #3
0
        private void LineType_TableNewRow(object sender, System.Data.DataTableNewRowEventArgs e)
        {
            FFDataSet.LineTypeRow row = e.Row as FFDataSet.LineTypeRow;

            int max =
                (from LineType in this.LineType
                 select LineType.id).Max();

            row.id   = max + 1;
            row.name = "";
        }
コード例 #4
0
        private void EnvelopeGroup_TableNewRow(object sender, System.Data.DataTableNewRowEventArgs e)
        {
            FFDataSet.EnvelopeGroupRow row = e.Row as FFDataSet.EnvelopeGroupRow;

            int max =
                (from EnvelopeGroup in this.EnvelopeGroup
                 select EnvelopeGroup.id).Max();

            row.id   = max + 1;
            row.name = "";
        }
コード例 #5
0
        private void Bank_TableNewRow(object sender, System.Data.DataTableNewRowEventArgs e)
        {
            FFDataSet.BankRow row = e.Row as FFDataSet.BankRow;

            int max =
                (from Bank in this.Bank
                 select Bank.id).Max();

            row.id            = max + 1;
            row.name          = "";
            row.routingNumber = "";
        }
コード例 #6
0
            /////////////////////////
            //   Internal Events
            private void EnvelopeDataTable_TableNewRow(object sender, System.Data.DataTableNewRowEventArgs e)
            {
                stayOut = true;
                EnvelopeRow envelopeRow = e.Row as EnvelopeRow;

                envelopeRow.id      = this.newID++;
                envelopeRow.name    = "New Envelope";
                envelopeRow.groupID = SpclEnvelope.NULL;
                envelopeRow.closed  = false;

                stayOut = false;
            }
コード例 #7
0
            /////////////////////////
            //   Internal Events
            private void AccountDataTable_TableNewRow(object sender, System.Data.DataTableNewRowEventArgs e)
            {
                AccountRow accountRow = e.Row as AccountRow;

                accountRow.id          = this.newID++;
                accountRow.name        = "New Account";
                accountRow.typeID      = SpclAccountType.NULL;
                accountRow.catagory    = SpclAccountCat.ACCOUNT;
                accountRow.closed      = false;
                accountRow.creditDebit = LineCD.DEBIT;
                accountRow.envelopes   = false;
            }
コード例 #8
0
        private void LineItem_TableNewRow(object sender, System.Data.DataTableNewRowEventArgs e)
        {
            FFDataSet.LineItemRow row = e.Row as FFDataSet.LineItemRow;

            int max =
                (from LineItem in this.LineItem
                 select LineItem.id).Max();

            row.id = max + 1;
            // TransactionID needs to be set by calling function.
            row.accountID   = SpclAccount.NULL;
            row.amount      = 0.0m;
            row.creditDebit = LineCD.CREDIT;
        }
コード例 #9
0
        private void Transaction_TableNewRow(object sender, System.Data.DataTableNewRowEventArgs e)
        {
            FFDataSet.TransactionRow row = e.Row as FFDataSet.TransactionRow;

            int max =
                (from Transaction in this.Transaction
                 select Transaction.id).Max();

            row.id                 = max + 1;
            row.date               = DateTime.Today;
            row.typeID             = SpclAccountType.NULL;
            row.description        = "";
            row.confirmationNumber = "";
            row.complete           = LineComplete.PENDING;
        }
コード例 #10
0
        private void Account_TableNewRow(object sender, System.Data.DataTableNewRowEventArgs e)
        {
            FFDataSet.AccountRow row = e.Row as FFDataSet.AccountRow;

            int max =
                (from Account in this.Account
                 select Account.id).Max();

            row.id        = max + 1;
            row.name      = "";
            row.typeID    = SpclAccountType.NULL;
            row.catagory  = SpclAccountCat.EXPENSE;
            row.closed    = false;
            row.envelopes = false;
        }
コード例 #11
0
ファイル: Form1.cs プロジェクト: offlinehacker/Bastet-GUI
 /// <summary>
 /// Event handler if we add row to BASYS_ADDR table.
 /// We go throught all BASYS_ADDR sub tables and add a new row.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e">Info about row</param>
 public void BASYS_ADDR_TableNewRow( object sender, DataTableNewRowEventArgs e )
 {
     //Go throught all tables and add new rows.
     foreach( DataTable table in devices.Tables)
     {
         //Skip head table.
         if( table.TableName==e.Row.Table.TableName || table.TableName=="Device")
             continue;
         //First we create new row by table's constructor.
         DataRow row = table.NewRow();
         //We set parent row
         row.SetParentRow(e.Row);
         //We add row to table.
         table.Rows.Add(row);
     }
 }
コード例 #12
0
            /////////////////////////
            //   Internal Events
            private void LineItemDataTable_TableNewRow(object sender, System.Data.DataTableNewRowEventArgs e)
            {
                stayOut = true;
                LineItemRow newRow = e.Row as LineItemRow;

                newRow.id = newLineID++;
                //newRow.transactionID = this.transactionID;
                newRow.date               = DateTime.Now.Date;
                newRow.typeID             = SpclLineType.NULL;
                newRow.accountID          = SpclAccount.NULL;
                newRow.oppAccountID       = SpclAccount.NULL;
                newRow.description        = "";
                newRow.confirmationNumber = "";
                newRow.envelopeID         = SpclEnvelope.NULL;
                newRow.complete           = LineState.PENDING;
                newRow.amount             = 0.0m;
                newRow.creditDebit        = LineCD.CREDIT;
                newRow.lineError          = false;

                stayOut = false;
            }
コード例 #13
0
 private static void Table_NewRow(object sender,DataTableNewRowEventArgs e)
 {
     // e.Row.RowState.ToString());
 }
コード例 #14
0
 private void NewRowCreated(DataRow row)
 {
     if (this.onTableNewRowDelegate != null)
     {
         DataTableNewRowEventArgs e = new DataTableNewRowEventArgs(row);
         this.OnTableNewRow(e);
     }
 }
コード例 #15
0
 private void Table_NewRow(object sender, DataTableNewRowEventArgs e)
 {
     ResetOrders(e.Row["Buy_SellIndicator"], e.Row["TokenNo"], e.Row["OrderNumber"]);
 }
コード例 #16
0
ファイル: ThemeEditor2.cs プロジェクト: netgrim/MapKit
 void Theme_TableNewRow(object sender, DataTableNewRowEventArgs e)
 {
     int i = 1;
     string name;
     do
     {
         name = "New " + e.Row.Table.TableName;
         if (i > 1)
             name += " " + i;
         i++;
     } while (e.Row.Table.Select("name='" + name + "'").Length > 0);
     e.Row["Name"] = name;
 }
コード例 #17
0
 protected override void OnTableNewRow(DataTableNewRowEventArgs e)
 {
     base.OnTableNewRow(e);
 }
コード例 #18
0
 public void NewRowEvent(object sender, DataTableNewRowEventArgs e)
 {
     Helpers.Log("New Row");
     newRow = e.Row;
 }
コード例 #19
0
ファイル: LogTable.cs プロジェクト: rdengineering/Utils.Log
 void table_log_t_TableNewRow(object sender, DataTableNewRowEventArgs e)
 {
     if ( this.data_grid.RowCount > 0 )
         this.data_grid.CurrentCell = this.data_grid[0,0];
 }
コード例 #20
0
ファイル: MainForm.cs プロジェクト: blgrnboy/pingutility
 private void DataTable_TableNewRow(object sender, DataTableNewRowEventArgs e)
 {
     RefreshDataTable();
 }
コード例 #21
0
 /// <summary>
 /// Handles the event of a new row being added
 /// </summary>
 /// <param name="sender">The object that notified of the event</param>
 /// <param name="e">Attached arguments regarding the event</param>
 private void NewRowHandler(object sender, DataTableNewRowEventArgs e)
 {
     if (ObjectInitialiser != null)
     {
         ObjectInitialiser.InitialiseDataRow(e.Row);
     }
 }
コード例 #22
0
ファイル: MainForm.Data.cs プロジェクト: vpjulia/Salvia
        //  -------- InvoiceDetail

        private void InvoiceDetail_TableNewRow(object sender, DataTableNewRowEventArgs e)
        {
      //
        }
コード例 #23
0
ファイル: MainForm.Data.cs プロジェクト: vpjulia/Salvia
        //  --------  event

        private void ReceiptDetail_TableNewRow(object sender, DataTableNewRowEventArgs e)
        {
            (e.Row as MDataSet.ReceiptDetailRow).DateLastModif = DateTime.Now;

        }
コード例 #24
0
ファイル: MainForm.cs プロジェクト: sking1001/FbcFoodBank
 void MainForm_TableNewRow(object sender, DataTableNewRowEventArgs e)
 {
     if (e.Row.GetType() == typeof(FbcFoodBankDataSet.ContactsRow))
         this.NameChanged = true;
     else if (e.Row.GetType() == typeof(FbcFoodBankDataSet.VisitsRow))
         this.VisitChanged = true;
     this.DataChanged = true;
 }
コード例 #25
0
 private void FitLine_TableNewRow(object sender, System.Data.DataTableNewRowEventArgs e)
 {
 }
コード例 #26
0
 private void NewRowCreated(DataRow row) {
     if (null != onTableNewRowDelegate) {
         DataTableNewRowEventArgs eventArg =  new DataTableNewRowEventArgs(row);
         OnTableNewRow(eventArg);
     }
 }
        /// <summary>
        /// Extends BeginInvoke so that when a state object is not needed, null does not need to be passed.
        /// <example>
        /// datatablenewroweventhandler.BeginInvoke(sender, e, callback);
        /// </example>
        /// </summary>
        public static IAsyncResult BeginInvoke(this DataTableNewRowEventHandler datatablenewroweventhandler, Object sender, DataTableNewRowEventArgs e, AsyncCallback callback)
        {
            if(datatablenewroweventhandler == null) throw new ArgumentNullException("datatablenewroweventhandler");

            return datatablenewroweventhandler.BeginInvoke(sender, e, callback, null);
        }
コード例 #28
0
ファイル: FJ.cs プロジェクト: vanloc0301/mychongchong
 public void FDJ_NewRow(object sender, DataTableNewRowEventArgs e)
 {
     e.Row["PROJECT_ID"] = (string)this.DataFormConntroller.GetParamValue(SkyMap.Net.DataForms.ParamNames.PProjectId, "");
     e.Row["序号"] = e.Row.Table.Rows.Count + 1;
     e.Row["区片号"] = txt区片号.Text.ToString();
     e.Row["样点编号"] = e.Row.Table.Rows.Count + 1;
     e.Row["区镇"] = lue_镇区.Text.ToString();
     OnChanged(this, null);
 }
コード例 #29
0
 private void OFXFiles_TableNewRow(object sender, System.Data.DataTableNewRowEventArgs e)
 {
 }
コード例 #30
0
 void Data_TableNewRow(object sender, DataTableNewRowEventArgs e)
 {
     TimeLogData_RowChanged(sender, null);
 }
コード例 #31
0
 void DataTable_TableNewRow(object sender, DataTableNewRowEventArgs e)
 {
     FazerValidacao(e.Row);
 }
コード例 #32
0
ファイル: DataTable.cs プロジェクト: dotnet/corefx
 protected virtual void OnTableNewRow(DataTableNewRowEventArgs e)
 {
     if (_onTableNewRowDelegate != null)
     {
         DataCommonEventSource.Log.Trace("<ds.DataTable.OnTableNewRow|INFO> {0}", ObjectID);
         _onTableNewRowDelegate(this, e);
     }
 }
コード例 #33
0
 private static void SpreadTable_NewRow(object sender, DataTableNewRowEventArgs e)
 {
 }
コード例 #34
0
ファイル: TableDocument.cs プロジェクト: tdhieu/openvss
        /// <summary>
        /// Handles adding new index.
        /// </summary>
        /// <param name="sender">Event sender, unused.</param>
        /// <param name="e">Detailed information about event.</param>
        void OnNewIndex(object sender, DataTableNewRowEventArgs e)
        {
            Debug.Assert(e != null && e.Row != null, "Empty event argumets provided!");

            // Extract added index
            DataRow newIndex = e.Row;
            if (newIndex == null)
                return;

            // Initialize new column attributes
            newIndex[Index.Schema] = Schema;
            newIndex[Index.Table] = OldName; // Old name is used to keep table name for all indexes the same.
            newIndex[Index.Name] = BuildNewIndexName();
            newIndex[Index.IndexKind] = IndexDescriptor.INDEX;
            newIndex[Index.IndexType] = IndexDescriptor.BTREE;
        }
コード例 #35
0
 /// <summary>
 ///     Eventhandler for the datatable of strings
 /// </summary>
 private void stringsTable_RowInserted(object sender, DataTableNewRowEventArgs e)
 {
     this.Dirty = true;
 }
コード例 #36
0
ファイル: TableDocument.cs プロジェクト: tdhieu/openvss
        /// <summary>
        /// Handles adding new key.
        /// </summary>
        /// <param name="sender">Event sender, unused.</param>
        /// <param name="e">Detailed information about event.</param>
        void OnNewForeignKey(object sender, DataTableNewRowEventArgs e)
        {
            Debug.Assert(e != null && e.Row != null, "Empty event argumets provided!");

            // Extract added foreign key column
            DataRow newKey = e.Row;
            if (newKey == null)
                return;

            // Initialize new column attributes
            newKey[ForeignKey.Schema] = Schema;
            newKey[ForeignKey.Table] = OldName; // Old name is used to keep table name for all keys the same.
            newKey[ForeignKey.Name] = BuildNewKeyName();
            newKey[ForeignKey.OnDelete] = ForeignKeyDescriptor.RESTRICT;
            newKey[ForeignKey.OnUpdate] = ForeignKeyDescriptor.RESTRICT;
        }
コード例 #37
0
ファイル: DataTableTest.cs プロジェクト: symform/mono
		private void OnTableNewRowAdded (object src, DataTableNewRowEventArgs args)
		{
			_tableNewRowAddedEventFired = true;
		}
コード例 #38
0
ファイル: TableDocument.cs プロジェクト: tdhieu/openvss
        /// <summary>
        /// Handles adding new foreign key collumn.
        /// </summary>
        /// <param name="sender">Event sender, unused.</param>
        /// <param name="e">Detailed information about event.</param>
        void OnNewForeignKeyColumn(object sender, DataTableNewRowEventArgs e)
        {
            Debug.Assert(e != null && e.Row != null, "Empty event argumets provided!");

            // Extract added foreign key column
            DataRow newColumn = e.Row;
            if (newColumn == null)
                return;

            // Initialize new column attributes
            newColumn[ForeignKeyColumn.Schema] = Schema;
            newColumn[ForeignKeyColumn.Table] = OldName; // Old name is used to keep table name for all columns the same.

            // Set foreign key name to empty string
            newColumn[ForeignKeyColumn.ForeignKeyName] = String.Empty;
            
            // Search for any not deleted column and set name for foreign key column
            DataRow dataColumn = DataInterpreter.GetNotDeletedRow(Columns);
            newColumn[ForeignKeyColumn.Name] =  dataColumn != null 
                                                ? DataInterpreter.GetStringNotNull(dataColumn, Column.Name)
                                                : String.Empty;
        }
コード例 #39
0
 protected virtual void OnTableNewRow(DataTableNewRowEventArgs  e) {
     if (onTableNewRowDelegate != null) {
         Bid.Trace("<ds.DataTable.OnTableNewRow|INFO> %d#\n", ObjectID);
         onTableNewRowDelegate(this, e);
     }
 }
コード例 #40
0
ファイル: TableDocument.cs プロジェクト: tdhieu/openvss
        /// <summary>
        /// Handles adding new collumn.
        /// </summary>
        /// <param name="sender">Event sender, unused.</param>
        /// <param name="e">Detailed information about event.</param>
        private void OnNewColumnRow(object sender, DataTableNewRowEventArgs e)
        {
            Debug.Assert(e != null && e.Row != null, "Empty event argumets provided!");
            
            // Extract added column
            DataRow newColumn = e.Row;
            if (newColumn == null)
                return;

            // Initialize new column attributes
            newColumn[Column.Schema] = Schema;
            newColumn[Column.Table] = OldName; // Old name is used to keep table name for all columns the same.
            newColumn[Column.Name] = BuildNewColumnName();
        }