예제 #1
0
        private void buttoncatupdate_Click(object sender, EventArgs e)
        {
            selectedCategory.Name = textBoxcatname.Text;
            CategoryBusiness.UpdateCategory(selectedCategory);

            ShowCategories();
            ShowCategoriesComboBox();
        }
예제 #2
0
 public ActionResult EditCategory(CategoryViewModel model)
 {
     //  if (ModelState.IsValid)
     {
         _Category.UpdateCategory(model);
         return(RedirectToAction("Index"));
     }
     //  return View(model);
 }
예제 #3
0
 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");
 }
예제 #4
0
        /// <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);
        }