示例#1
0
        /// <summary>
        /// Получить цсв представление продукта.
        /// </summary>
        /// <returns></returns>
        public string GetLine()
        {
            string        result = "\"";
            List <string> t      = new List <string>();

            t.Add(Name);
            t.Add(Description);
            t.Add(Article);
            t.Add(Amount.ToString());
            t.Add(Price1.ToString());
            t.Add(Price2.ToString());
            t.Add(Guarantee);
            result += String.Join("\",\"", t) + "\"";
            return(result);
        }
示例#2
0
        private void Form1_Load(object sender, EventArgs e)
        {
            lblProduct1.Text = "Black Tea ";
            lblProduct2.Text = "Green Tea ";
            lblProduct3.Text = "Milk Tea ";
            lblProduct4.Text = "Flower Tea ";
            lblProduct5.Text = "Juice ";

            Price1 = 35.0;
            Price2 = 40.0;
            Price3 = 45.0;
            Price4 = 50.0;
            Price5 = 55.0;

            lblPrice1.Text = Price1.ToString();
            lblPrice2.Text = Price2.ToString();
            lblPrice3.Text = Price3.ToString();
            lblPrice4.Text = Price4.ToString();
            lblPrice5.Text = Price5.ToString();

            Percent = 10.0;
        }