private void buttoncatupdate_Click(object sender, EventArgs e) { selectedCategory.Name = textBoxcatname.Text; CategoryBusiness.UpdateCategory(selectedCategory); ShowCategories(); ShowCategoriesComboBox(); }
public ActionResult EditCategory(CategoryViewModel model) { // if (ModelState.IsValid) { _Category.UpdateCategory(model); return(RedirectToAction("Index")); } // return View(model); }
protected void Button1_Click(object sender, EventArgs e) { if (!String.IsNullOrEmpty(editID)) { categoryBusiness.UpdateCategory(long.Parse(editID), txtTitle.Text); } else { categoryBusiness.AddCategory(txtTitle.Text); } Response.Redirect("Categorys.aspx"); }
/// <summary> /// Método que actualiza en registro de la entidad /// </summary> public async Task <Category> UpdateCategory(Guid ID, string JCategory) { Category cat = categoryBusiness.UpdateCategory(ID, JCategory); return(cat); }