public void Changed(object sender, TableDependency.SqlClient.Base.EventArgs.RecordChangedEventArgs <SaleFoodOnline> e)
        {
            var changedEntity = e.Entity;

            MessageBox.Show("DML operation: " + e.ChangeType);
            MessageBox.Show("ID: " + changedEntity.SaleFoodIDFact);
        }
Exemplo n.º 2
0
        private void _tableDependency_OnChanged(object sender, TableDependency.SqlClient.Base.EventArgs.RecordChangedEventArgs <HmiMgmtExchange> e)
        // Er is een wijziging in de tabel
        {
            string groepNaam = e.Entity.Machine; // Groep identifer van Clients. ==> Enkel clients met dia aangesloten zijn aan een grope met dezelfde naam ontvangen een melding.

            switch (e.ChangeType)
            {
            case ChangeType.None:
                // Doe niets
                break;

            case ChangeType.Delete:
                // Aangepast Object versturen naar alle clients in groep met naam: "groepNaam"
                _hubContext.Clients.Group(groepNaam).SendAsync("DeletedItem", e.Entity);
                break;

            case ChangeType.Insert:
                // Aangepast Object versturen naar alle clients in groep met naam: "groepNaam"
                _hubContext.Clients.Group(groepNaam).SendAsync("InsertedItem", e.Entity);
                break;

            case ChangeType.Update:
                // Aangepast Object versturen naar alle clients in groep met naam: "groepNaam"
                _hubContext.Clients.Group(groepNaam).SendAsync("UpdatedItem", e.Entity);
                break;

            default:
                break;
            }
        }
Exemplo n.º 3
0
        private static void Dep_OnChanged(object sender, TableDependency.SqlClient.Base.EventArgs.RecordChangedEventArgs <UserModel> e)
        {
            var changedEntity = e.Entity;

            Console.WriteLine("DML operation: " + e.ChangeType);
            Console.WriteLine("ID: " + changedEntity.UserId);
            Console.WriteLine("Name: " + changedEntity.FirstName);
            Console.WriteLine("Surname: " + changedEntity.LastName);
        }
Exemplo n.º 4
0
        private static void TableDependency_OnChanged(object sender, TableDependency.SqlClient.Base.EventArgs.RecordChangedEventArgs <Customer> e)
        {
            Console.WriteLine(Environment.NewLine);

            if (e.ChangeType != TableDependency.SqlClient.Base.Enums.ChangeType.None)
            {
                var changedEntity = e.Entity;
                Console.WriteLine("DML operation: " + e.ChangeType);
                Console.WriteLine("ID: " + changedEntity.Id);
                Console.WriteLine("Name: " + changedEntity.Name);
                Console.WriteLine("Surname: " + changedEntity.Surname);
                Console.WriteLine(Environment.NewLine);
            }
        }
Exemplo n.º 5
0
        private void SqlTableDependency_OnChanged(object sender, TableDependency.SqlClient.Base.EventArgs.RecordChangedEventArgs <tblProduct> e)
        {
            switch (e.ChangeType)
            {
            case ChangeType.Delete:
                this.Clients.All.removetblProduct(e.Entity);
                break;

            case ChangeType.Insert:
                this.Clients.All.addtblProduct(e.Entity);
                break;

            case ChangeType.Update:
                this.Clients.All.updatetblProduct(e.Entity);
                break;
            }
        }
Exemplo n.º 6
0
        private void _serviceDependency_OnChanged(object sender, TableDependency.SqlClient.Base.EventArgs.RecordChangedEventArgs <ServiceReport> e)
        {
            var    changedEntity = e.Entity;
            string type          = e.ChangeType.ToString();

            if (type == "Insert")
            {
                //string fileName = "";
                //string filepath = @"\\spm-adfs\Shares\Shail\vs\";
                //System.IO.Directory.CreateDirectory(filepath);
                //fileName = filepath + changedEntity.Title + ".pdf";
                //SaveReport(changedEntity.Title, fileName);
                makereportAsync(changedEntity.Title);
                //Console.WriteLine("New Report got added");
                //string fileName = "";
                //string filepath = @"\\spm-adfs\Shares\Shail\vs\";
                //fileName = filepath + changedEntity.Title + ".pdf";

                //SendEmail("*****@*****.**", "SPM CONNECT - PROBLEM CASE ID: " + Path.GetRandomFileName(), changedEntity.Title, "");
            }
        }
 private void Dep_OnChanged(object sender, TableDependency.SqlClient.Base.EventArgs.RecordChangedEventArgs <Modelos.Categoria> e)
 {
     MessageBox.Show(e.Entity.Descripcion.Trim() + " Ha cambiado");
 }
Exemplo n.º 8
0
        private void _subscriptionMonitor_OnChanged(object sender, TableDependency.SqlClient.Base.EventArgs.RecordChangedEventArgs <DataSubscription> e)
        {
            string changeType = e.ChangeType.ToString().ToUpper();

            base.SubscriptionChangeNotification(changeType, e.Entity);
        }
Exemplo n.º 9
0
        private void _connectionDefMonitor_OnChanged(object sender, TableDependency.SqlClient.Base.EventArgs.RecordChangedEventArgs <FDASourceConnection> e)
        {
            string changeType = e.ChangeType.ToString().ToUpper();

            base.SourceConnectionMonitorNotification(changeType, e.Entity);
        }
Exemplo n.º 10
0
        private void _DemandMonitor_OnChanged(object sender, TableDependency.SqlClient.Base.EventArgs.RecordChangedEventArgs <FDARequestGroupDemand> e)
        {
            string changeType = e.ChangeType.ToString().ToUpper();

            base.DemandMonitorNotification(changeType, e.Entity);
        }
Exemplo n.º 11
0
        private void _dataPointDefMonitor_OnChanged(object sender, TableDependency.SqlClient.Base.EventArgs.RecordChangedEventArgs <FDADataPointDefinitionStructure> e)
        {
            string changeType = e.ChangeType.ToString().ToUpper();

            base.DataPointMonitorNotification(changeType, e.Entity);
        }