Example #1
0
        private void Quando_adicionar_ou_atualizar_registro_base()
        {
            _tableWith2Keys.Collumns["Record"].Value = "Teste 1";
            _tableWith2Keys.Collumns["Key1"].Value   = "1";
            _tableWith2Keys.Collumns["Key2"].Value   = "2";
            _tableWith2Keys.Add();

            _tableWith2Keys.Collumns["Record"].Value = "Fabio Teste 2";
            _tableWith2Keys.Update();
        }
        void tableAdpterBaser_OnAfterAdd(object Sender, TableAdapterEventArgs e)
        {
            SetTableAndDbNameLogFor(Sender as TableAdapter);

            _tableLog.Collumns[FieldsName.DateAddLog].Value  = DataBaseAdapter.GetServerDate();
            _tableLog.Collumns[FieldsName.MachineLog].Value  = Environment.MachineName;
            _tableLog.Collumns[FieldsName.UserNameLog].Value = Connection.Instance.ConnectionParameter.UserName;
            _tableLog.Collumns[FieldsName.BaseIdLog].Value   = GetBaseId();
            _tableLog.Collumns[FieldsName.InstanceLog].Value = GetNextSeqInstanceLog();

            foreach (var collumn in _tableLogBase.Collumns)
            {
                _tableLog.Collumns[collumn.Name].Value = collumn.Value;
            }

            _tableLog.Add();
        }