Example #1
0
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }
            OrderClass o = obj as OrderClass;

            if ((System.Object)o == null)
            {
                return(false);
            }


            return((amount == o.getAmt()) && (cardNo == o.getCardNo()) && senderId.Equals(o.getID()));
        }
Example #2
0
        public void setOrder(OrderClass s)
        {
            StringBuilder temp = new StringBuilder();
            temp.Append(s.getAmt().ToString());  //Appends amount to string
            temp.Append(" ");
            temp.Append(s.getCardNo().ToString()); //Appends card number to string
            temp.Append(" ");
            temp.Append(s.getID().ToString()); //Appends ID to string
            temp.Append(" ");
            temp.Append(s.getOrderId().ToString()); //Appends orderId to string
            temp.Append(" ");
            temp.Append(s.getnoRooms().ToString()); //Appends number of rooms to string
            temp.Append(" ");
            temp.Append(s.getPrice().ToString());  //Appends price per room to string
            temp.Append(" ");

            order = temp.ToString(); //builds string
            EncryptionService.ServiceClient serviceClient = new EncryptionService.ServiceClient(); //Instantiates encryption service
            order = serviceClient.Encrypt(order);  //encrypts string
        }
Example #3
0
        public void setOrder(OrderClass s)
        {
            StringBuilder temp = new StringBuilder();

            temp.Append(s.getAmt().ToString());     //Appends amount to string
            temp.Append(" ");
            temp.Append(s.getCardNo().ToString());  //Appends card number to string
            temp.Append(" ");
            temp.Append(s.getID().ToString());      //Appends ID to string
            temp.Append(" ");
            temp.Append(s.getOrderId().ToString()); //Appends orderId to string
            temp.Append(" ");
            temp.Append(s.getnoRooms().ToString()); //Appends number of rooms to string
            temp.Append(" ");
            temp.Append(s.getPrice().ToString());   //Appends price per room to string
            temp.Append(" ");


            order = temp.ToString();                                                               //builds string
            EncryptionService.ServiceClient serviceClient = new EncryptionService.ServiceClient(); //Instantiates encryption service
            order = serviceClient.Encrypt(order);                                                  //encrypts string
        }