Exemplo n.º 1
0
        private void ProcessTerminalProvisionMsg(string msg)
        {
            try
            {
                Messages          messages = new Messages();
                TerminalProvision terminal = new TerminalProvision();
                terminal = messages.DeSerializeProvision(msg);
                if (terminal != null)
                {
                    if (terminal.TerminalId != String.Empty)
                    {
                        int ins = _TpTableAdapter.Insert(terminal.TerminalId, terminal.TerminalType,
                                                         terminal.TerminalIp, terminal.RemoteIp, terminal.Name, terminal.AliasName,
                                                         terminal.Location, terminal.JournalPath, terminal.ImagePath, terminal.CustodianName,
                                                         terminal.Phone, terminal.Email, terminal.Address, terminal.EntryDate, null);

                        if (ins > 0)
                        {
                            Console.WriteLine("Terminal Provision Inserted...");
                            DeleteReceivedPRocessRecord(RecId, _taRecievedDataTableAdapter);
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine("Terminal Provisioning Failed. " + ex.Message);
            }
        }
Exemplo n.º 2
0
        private void ProcessTerminalProvisionMsg(string msg, int recId)
        {
            Messages          messages = new Messages();
            TerminalProvision terminal = new TerminalProvision();

            terminal = messages.DeSerializeProvision(msg);
            if (terminal != null)
            {
                if (terminal.TerminalId != String.Empty)
                {
                    _TpTableAdapter = new TerminalProvisionTableAdapter();
                    int ins = _TpTableAdapter.Insert(terminal.TerminalId, terminal.TerminalType,
                                                     terminal.TerminalIp, terminal.RemoteIp, terminal.Name, terminal.AliasName,
                                                     terminal.Location, terminal.JournalPath, terminal.ImagePath, terminal.CustodianName,
                                                     terminal.Phone, terminal.Email, terminal.Address, terminal.EntryDate, null);

                    if (ins > 0)
                    {
                        Console.WriteLine("Terminal Provision Inserted...");
                        DeleteRecordFromTable(recId);
                    }
                }
            }
        }