Ejemplo n.º 1
0
 /// <summary>
 /// событие нажатия на кнопку добавить
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void b_add_Click(object sender, EventArgs e)
 {
     string author = tb_author.Text;
        string year = tb_year.Text;
        this.add_new_food_in_book(Convert.ToInt32(_id), author, year);
        add_food_in_book food_in_book = new add_food_in_book(Program.data_module, Convert.ToInt32(this._id), author, year);
        food_in_book.book = this.tb_name.Text;
        food_in_book.ShowDialog();
        this.load_data_table(this._current_state);//обновляем дата грид
 }
Ejemplo n.º 2
0
 //Добавление блюда
 private void add_new_food_in_book()
 {
     add_food_in_book add_food = new add_food_in_book(Program.data_module, book_id, author, year);
     add_food.ShowDialog();
 }