public AllFee AddFeeByID(int id) { try { AllFee allFee = _context.AllFee.Find(id); return(allFee); } catch (Exception) { throw; } }
public void SaveFee(AllFee allFee) { try { _context.AllFee.Add(allFee); _context.SaveChanges(); } catch (Exception) { throw; } }
public IActionResult Add(AllFee AllFee) { AllFee objfee = new AllFee { FeeID = AllFee.FeeID, FeeName = AllFee.FeeName, FeeAmount = AllFee.FeeAmount, FeeTimeID = AllFee.FeeTimeID, ClassID = AllFee.ClassID, }; _IAllFee.SaveFee(objfee); TempData["FeeMessage"] = "Fee Saved Successfully"; ModelState.Clear(); return(View(new AllFee())); }