public IActionResult Update(Scategory scategory) { _scategoryRepository.Update(scategory); scategoryViewModel.ScategoryList = new List <Scategory>(); scategoryViewModel.ScategoryList = _scategoryRepository.GetAll().ToList(); scategoryViewModel.Scategory = new Scategory(); return(PartialView("_List", scategoryViewModel)); }
private void button1_Click_2(object sender, EventArgs e) { if (Scategory.Text == "") { MessageBox.Show("Please type in category."); Scategory.Focus(); } else if (CMBsearchbox.Text == "") { MessageBox.Show("Please Choose or type in title."); CMBsearchbox.Focus(); } else { gotoclassnotes.Scat = Scategory.Text; gotoclassnotes.stit = CMBsearchbox.Text; gotoclassnotes.checks123 = true; txtmainpanel.Controls.Clear(); refreshpanal2(); } }
public IActionResult Create(Scategory scategory) { _scategoryRepository.Create(scategory); return(RedirectToAction("Index")); }