private void btnAdd_Click(object sender, EventArgs e) { CategoryBaseServiceReference.CategoryBase model = new CategoryBaseServiceReference.CategoryBase(); model.CategoryName = txtCategoryName.Text; var client = new CategoryBaseServiceReference.BreadShopOf_CategoryBaseClient(); client.Add(model); MessageBox.Show("추가하였습니다."); DisplayData(); }
private void btnEdit_Click(object sender, EventArgs e) { var client = new CategoryBaseServiceReference.BreadShopOf_CategoryBaseClient(); CategoryBaseServiceReference.CategoryBase model = new CategoryBaseServiceReference.CategoryBase(); model.CategoryId = Convert.ToInt32(txtCategoryId.Text); model.CategoryName = txtCategoryName.Text; client.Edit(model); MessageBox.Show("수정되었습니다."); txtCategoryId.Text = ""; txtCategoryName.Clear(); DisplayData(); }