private void buttonUpdateCategory_Click(object sender, EventArgs e) { selectedCategory.Name = textBoxCategoryName.Text; selectedCategory.Description = textBoxCategoryDescription.Text; categoryBusiness.Edit(selectedCategory); getCategories(); }
public ActionResult Edit(Category model) { // TODO: Add update logic here //var lista = CategoryBusiness.GetCategoryList(); //Student category = lista.Find(x => x.Id == id); //category.name = name; //category.ChangedOn = DateTime.Now; CategoryBusiness.Edit(model); return(RedirectToAction("Index")); }
private void buttonUpdateCats_Click(object sender, EventArgs e) { selectedCategory.Name = textBoxCatsName.Text; selectedCategory.Info = textBoxCatsInfo.Text; categoryBusiness.Edit(selectedCategory); MessageBox.Show("Kaydınız başarıyla güncellendi!"); showCategories.ShowCategories(dataGridViewShowCats); }
public void Edit(Category category) { try { categoryBussiness.Edit(category); } catch (Exception ex) { var httpError = new HttpResponseMessage() { StatusCode = (HttpStatusCode)422, ReasonPhrase = ex.Message }; throw new HttpResponseException(httpError); } }
public void Edit(Category category) { try { var bc = new CategoryBusiness(); category.ChangedOn = System.DateTime.Now; bc.Edit(category); } catch (Exception ex) { var httpError = new HttpResponseMessage() { StatusCode = (HttpStatusCode)422, ReasonPhrase = ex.Message }; throw new HttpResponseException(httpError); } }