Пример #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            Controller c = new Controller();
               String[] TT=c.LoadValues(category);

              //  char Split = '.';

            Dictionary<String, String> auth = new Dictionary<String, String>();
             foreach(String y in TT)
             {
             if(!auth.ContainsKey(y))
             {
                 auth.Add(y, y);
             }

             }
             comboBox2.DataSource = new BindingSource(auth, null);
        }
Пример #2
0
        private void button2_Click(object sender, EventArgs e)
        {
            StringBuilder Temp = new StringBuilder();
            Controller c1 = new Controller();
            String [] YY=c1.LoadTitle(Auth);
            foreach(String t in YY)
            {
                Temp.Append(t);
                Temp.Append(",   ");

            }
            Dictionary<String, String> NameofBook = new Dictionary<String, String>();
            foreach (String t in YY)
            {
                if (!NameofBook.ContainsKey(t))
                {
                    NameofBook.Add(t,t);
                }

            }
            comboBox3.DataSource = new BindingSource(NameofBook, null);
            button3.Visible = true;
             //label1.Text = (Temp.ToString());
        }
Пример #3
0
 private void button3_Click(object sender, EventArgs e)
 {
     Controller n = new Controller();
     String Value=n.GetPrice(Name);
     label1.Text=Value;
 }