private void button1_Click(object sender, EventArgs e) { int i = blc.CreateCategory(txtCategoryName.Text); MessageBox.Show("Category" + " " + txtCategoryName.Text + " is Saved"); // MessageBox.Show("New category is entered", "Success", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); }
public ActionResult CreateCategories(Category model) { var a = cat.CreateCategory(model); if (a > 0) { ViewBag.Message = "Category Created"; } return(View(model)); }
private void btnCreateCategory_Click(object sender, EventArgs e) { CategoryDetails cat = new CategoryDetails(); cat.CategoryName = txtCategory.Text; int i = bc.CreateCategory(cat); if (i > 0) { MessageBox.Show("Category Created"); this.DialogResult = DialogResult.OK; } }