Ejemplo n.º 1
0
        public Response UpdateComDetails(ComDetails obj)
        {
            List <ComDetails> itemList = new List <ComDetails>();
            var IsExist = entities.comports.Where(x => x.id == obj.id).ToList();

            if (IsExist.Count != 0)
            {
                comport itemObj = entities.comports.Where(x => x.id == obj.id).FirstOrDefault();

                itemObj.port     = obj.port;
                itemObj.buadRate = obj.buadRate;
                itemObj.parity   = obj.parity;
                itemObj.dataBit  = obj.dataBit;
                itemObj.stopBit  = obj.stopBit;
                entities.SaveChanges();
                return(new Response {
                    IsSuccess = true, Message = "COM Port Configured successfully"
                });
            }
            else
            {
                return new Response {
                           IsSuccess = false, Message = "Configuration Error. Contact Administrator"
                }
            };
        }

        #endregion
    }
    new display()
    {
        new comport ITipoAereo = newVolador();
        {
            ita = Volador();
            ita = Atletico();
            ita = new Agil
                  saltar();

            maniobrar();
            golpear();
            aplicar();
        }
    }