Exemplo n.º 1
0
        public override string ToString()
        {
            string text = "Hosting Unit Key: " + HostingUnitKey.ToString() + "Guest Request Key: " + GuestRequestKey.ToString() + "\n Order Key: " + OrderKey.ToString() + "\n The request was created on " + CreateDate.ToString() + "\nStatus: ";

            switch ((int)Status)
            {
            case 0:
                text += " Not answered";
                break;

            case 1:
                text += " The mail was sent";
                break;

            case 2:
                text += " Closed because the client was not interested";
                break;

            case 3:
                text += " Closed by answer to the client";
                break;
            }
            if ((int)Status > 0)
            {
                text += "\nOrderDate: " + OrderDate.ToString();
            }
            return(text);
        }
Exemplo n.º 2
0
 public override string ToString()
 {
     return("hosting unit key: " + HostingUnitKey.ToString() + "\n" +
            "hosting unit name: " + HostingUnitName.ToString() + "\n" +
            "hosting unit area: " + Area.ToString() + "\n" +
            "hosting unit sub area: " + SubArea + "\n" +
            DiaryToString());
 }
Exemplo n.º 3
0
 public override string ToString()
 {
     return("Hosting unit key: " + HostingUnitKey.ToString() + "/n" +
            "Guest request key: " + GuestRequestKey.ToString() + "/n" +
            "Order key: " + OrderKey.ToString() + "/n" +
            "Status: " + Status.ToString() + "/n" +
            "Orderd date: " + OrderDate.ToString() + "/n" +
            "Create date" + CreateDate.ToString() + "/n");
 }
Exemplo n.º 4
0
        public override string ToString()
        {
            string hostingUnit = "";

            hostingUnit += "Key:" + HostingUnitKey.ToString();

            hostingUnit += "Owner:" + Owner.ToString();

            return(hostingUnit);
        }
Exemplo n.º 5
0
        public override string ToString()
        {
            string isSubArea = SubArea != default(Enum_s.SubArea) ? " Specific Area: " + SubArea.ToString("g") : "";

            return("Hosting Unit ID: " + HostingUnitKey.ToString() + " Hosting Unit Name: " + HostingUnitName + " Owner: " +
                   Owner.ToString() + "\nArea: " + Area.ToString("g") + isSubArea + " Hosting Unit Type: " + Type + "\nYour Group: Adults- " +
                   Adults.ToString() + " Children- " + Children.ToString() + " Special Additions: Pool- " + Pool.ToString() +
                   " Jucuzzi- " + Jacuzzi.ToString() + " Garden- " + Garden.ToString() + " Attractions For Children- " +
                   ChildrenAttractions.ToString() + "price for a day: " + Price.ToString() + '\n');
        }
Exemplo n.º 6
0
 public override string ToString()
 {
     return
         ("Hosting Unit Key: " + HostingUnitKey.ToString() + "\n"
          + "Guest Request Key: " + GuestRequestKey.ToString() + "\n"
          + "Order Key: " + OrderKey.ToString() + "\n"
          + "Fee: " + Fee.ToString() + "\n"
          + "Status: " + Status.ToString() + "\n"
          + "Create Date: " + CreateDate.ToString() + "\n");
     //+ "Order Date: " + OrderDate.ToString() + "\n";
 }
Exemplo n.º 7
0
 public override string ToString()
 {
     return("Hosting Unit Key: " + HostingUnitKey.ToString() + "\n"
            + "Hosting Unit Name: " + HostingUnitName.ToString() + "\n"
            + "Price: " + price.ToString() + "\n"
            + "Area: " + Area.ToString() + "\n"
            + "Type: " + Type.ToString() + "\n"
            + "Adults: " + Adults.ToString() + "\n"
            + "Children: " + Children.ToString() + "\n"
            + "Pool: " + Pool.ToString() + "\n"
            + "Jacuzzi: " + Jacuzzi.ToString() + "\n"
            + "Garden: " + Garden.ToString() + "\n"
            + "Beach: " + Beach.ToString() + "\n"
            + "Attractions: " + ChildrenAttractions.ToString() + "\n");
 }
Exemplo n.º 8
0
        /*public bool this[DateTime i]
         * {
         *  get { return Diary[i.Month - 1, i.Day - 1]; }
         *  set { Diary[i.Month - 1, i.Day - 1] = value; }
         * }*/
        public override string ToString()
        {
            string s = "HostingUnitKey: " + HostingUnitKey.ToString() + '\n' + " Owner: " + Owner.ToString() + '\n' + " HostingUnitName: " + HostingUnitName + "HostingUnitType" + Type + "\nArea: " + "SubArea: " + SubArea + Area.ToString() + "\nJacuzzi: " + Jacuzz + "\nPool: " + Pool + '\n';

            return(s);
        }
Exemplo n.º 9
0
 public override string ToString()
 {
     return("Hosting Unit ID: " + HostingUnitKey.ToString() + " Hosting Request ID: " + GuestRequestKey.ToString() +
            " Order ID: " + OrderKey.ToString() + " Order Status: " + Status + " Order Creation Date: " +
            CreateDate.ToString("d") + " Offer Date Submission: " + OrderDate.ToString("d"));
 }
Exemplo n.º 10
0
        private void UpdateHostingUnit_Button_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                if (errorMessages.Any())
                {
                    string err = "Exception: ";
                    foreach (var item in errorMessages)
                    {
                        err += "\n" + item;
                    }

                    MessageBox.Show(err);
                    return;
                }

                if (HostingUnitKey.ToString() == "" || Name.Text == "")
                {
                    MessageBox.Show($"you need to fill all details", "", MessageBoxButton.OK, MessageBoxImage.Error);
                }

                if (this.Pool.Text == "No")
                {
                    hostingUnit.Pool = false;
                }
                else
                {
                    hostingUnit.Pool = true;
                }

                if (this.Porch.Text == "No")
                {
                    hostingUnit.Porch = false;
                }
                else
                {
                    hostingUnit.Porch = true;
                }

                if (this.Jacuzzi.Text == "No")
                {
                    hostingUnit.Jacuzzi = false;
                }
                else
                {
                    hostingUnit.Jacuzzi = true;
                }

                if (this.ChildrenAttractions.Text == "No")
                {
                    hostingUnit.ChildrenAttractions = false;
                }
                else
                {
                    hostingUnit.ChildrenAttractions = true;
                }

                bl.UpdateHostingUnit(hostingUnit);
                this.DataContext = hostingUnit;
                this.Close();
                MessageBox.Show($"The hosting unit was updated by the system");
            }
            catch (FormatException)
            {
                MessageBox.Show("check your input and try again");
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Exemplo n.º 11
0
 }                                 //תאריך משלוח המייל ללקוח
 public override string ToString() //for debugging
 {
     return(HostingUnitKey.ToString());
 }
Exemplo n.º 12
0
        public override string ToString()

        {
            return(HostingUnitKey.ToString() + ' ' + HostingUnitName);
        }