Ejemplo n.º 1
0
        private void CurrentProductToForm(Client clientWantToBuy, Product product)
        {
            Client    client    = new Client();
            ClientArr clientArr = new ClientArr();

            clientArr.Fill();

            pictureBoxProperty0.ImageLocation = FindPicturePath() + product.Picture1;
            pictureBoxProperty1.ImageLocation = FindPicturePath() + product.Picture1;
            pictureBoxProperty2.ImageLocation = FindPicturePath() + product.Picture2;
            pictureBoxProperty3.ImageLocation = FindPicturePath() + product.Picture3;

            if (product.Catagory.ID == 1)
            {
                richTextBox2.Text = product.Adress + " מספר רחוב:" + Convert.ToInt32(product.StreetNo) + " מספר קומות:" + Convert.ToInt32(product.Floor);
            }
            else
            {
                richTextBox2.Text = product.Adress + " מספר רחוב:" + Convert.ToString(product.StreetNo) + " מספר קומה:" + Convert.ToString(product.Floor + " מספר דירה:" + Convert.ToString(product.AptNo));
            }
            if (product.IsSold == 1)
            {
                buttonWantToBuy.Visible = false;
            }
            else
            {
                buttonWantToBuy.Visible = true;
            }
            labelCity.Text      = product.City.Name;
            richTextBox1.Text   = product.Descreption;
            labelProductID.Text = Convert.ToString(product.ID);
            labelClientID.Text  = Convert.ToString(clientWantToBuy.ID);
            labelSize.Text      = " מ''ר " + Convert.ToString(product.Size);
            labelPrice.Text     = Convert.ToString(product.Price);

            client = clientArr.ReturnClientWithID(product.Client);
            labelCleintEmail.Text = client.Mail;
            labelCleintName.Text  = client.FirstName + " " + client.LastName;
            labelCleintPhone.Text = client.CellPhone_AreaCode + client.PhoneNumber;

            labelCatagory.Text = Convert.ToString(product.Catagory.ID);
        }
Ejemplo n.º 2
0
        private void FillListView(Client client, Product product)
        {
            ClientArr clientArr = new ClientArr();

            clientArr.Fill();

            Client client1 = new Client();

            client1 = clientArr.ReturnClientWithID(product.Client);
            //מוסיף נתונים לפקד תיבת התצוגה
            //יצירת מקור הנתונים

            ListViewItem listViewItem;

            //יצירת פריט-תיבת-תצוגה
            listViewItem = new ListViewItem(new[] { client.FullName, "", client.City.Name, "" });
            //הוספת פריט-תיבת-תצוגה לתיבת תצוגה
            listViewProducts.Items.Add(listViewItem);
            if (product.Catagory.ID == 1)
            {
                listViewItem = new ListViewItem(new[] { client1.FullName, "בית", product.City.Name, product.Adress + " " + product.StreetNo, Convert.ToString(product.Size), Convert.ToString(product.Price) });
            }
            else
            {
                listViewItem = new ListViewItem(new[] { client1.FullName, "דירה", product.City.Name, product.Adress + " " + product.StreetNo + " מספר דירה:" + product.AptNo, Convert.ToString(product.Size), Convert.ToString(product.Price) });
            }
            listViewProducts.Items.Add(listViewItem);

            richTextBox1.Text = " ההסכם :"
                                +
                                "שנערך ונחתם ביום " +
                                Convert.ToString(DateTime.Today.Day)
                                +
                                " בחודש: "
                                +
                                Convert.ToString(DateTime.Today.Month)
                                +
                                " ובשנת: "
                                +
                                Convert.ToString(DateTime.Today.Year)
                                +
                                " בין:"
                                +
                                " 1. " + client1.FullName
                                +
                                " 2. " + client.FullName
                                +
                                " שניהם מעיר: " + client1.City.Name + " ו " + client.City.Name
                                +
                                " מצד שני; " + "הואיל והמכורים הינם הבעלים והמחזיקים הבלעדיים של הנכס בעיר " + product.City.Name +
                                " וברחוב; " + product.Adress +
                                " במספר; " + product.StreetNo +
                                ", אשר זכויות המוכרים בה רשומות בלשכת רישום המקרקעין. "
                                +
                                "\n"
                                +
                                " הסכם זה הינו הסכם דיגיטלי בין המוכר: "
                                + client1.FullName
                                + " והקונה: "
                                + client.FullName
            ;
        }