public bool Add(SubCategory subCategory) { if (subCategory.Category == null) { return(false); } if (subCategory.Code != null && ((subCategory.Code == null) && (subCategory.Code.Length <= 2))) { return(false); } return(repository.Add(subCategory)); }
private void btnAddSubCategory_Click(object sender, EventArgs e) { if (String.IsNullOrEmpty(tbSubCategoryName.Text)) { MessageBox.Show("Alt Kategori adı boş bırakılamaz"); } else { SubCategory sc = new SubCategory(); sc.CategoryId = ((int)cbCategory.SelectedValue); sc.SubCategoryName = tbSubCategoryName.Text; s1.Add(sc); GetCategory(); GetSubCategory(); GetDataGrid(); } }
public bool Add(SubCategory entity) { return(_subCategoryRepository.Add(entity)); }
public bool Add(SubCategory subCategory) { return(repository.Add(subCategory)); }
public ActionResult Add(SubCategory model) { altKategoriRepo.Add(model); return(RedirectToAction("Index", "SubCategory", new { area = "Admin" })); }