Пример #1
0
        public static Consumbles GetConsumbles(int id_category)
        {
            Consumbles tmp_consumbles         = null;
            Dictionary <string, string> param = new Dictionary <string, string>();

            param.Add(RequestFields.ACTION, Actions.GET);
            param.Add(RequestFields.CATEGORY, id_category.ToString());
            SendGetRequest <Consumbles>(UriPostfix.CONSUMBLES, param, out tmp_consumbles);
            return(tmp_consumbles);
        }
Пример #2
0
 private void ComboBoxCategory_SelectedIndexChanged(object sender, EventArgs e)
 {
     try
     {
         Consumbles consumbles = ConsumblesCore.GetConsumbles(ConsumbleCategorieCore.consumbleCategories.GetID(comboBoxCategory.SelectedItem.ToString()));
         comboBoxConsumbles.DataSource    = consumbles.ToList();
         comboBoxConsumbles.SelectedIndex = 0;
         buttonOk.Enabled = true;
     }
     catch
     {
         comboBoxConsumbles.Text = "";
         buttonOk.Enabled        = false;
     }
 }