예제 #1
0
 private void btnAddRItem_Click(object sender, EventArgs e)
 {
     if (txtRecName.Text.Length < 1)
     {
         MessageBox.Show("레시피 명을 입력해주세요");
     }
     else if (txtRecipe.Text.Length < 1)
     {
         MessageBox.Show("레시피 방법을 입력하세요");
     }
     else
     {
         if (MessageBox.Show($"{txtRecName.Text}에 재료를 추가하시겠습니까?", "삭제확인", MessageBoxButtons.OKCancel)
             == DialogResult.OK)
         {
             items.recipeName = txtRecName.Text;
             items.recipe     = txtRecipe.Text;
             db.AddRecipe(items);
             AddRecipe frm = new AddRecipe();
             frm.ShowDialog();
         }
         else
         {
             MessageBox.Show("레시피 재료 추가를 취소하였습니다");
             return;
         }
     }
 }
예제 #2
0
        private void 레시피추가ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            AddRecipe frm = new AddRecipe();

            frm.ShowDialog();
        }