public ActionResult CreateBranch(FCLBranch model) { if (_manager.BranchExists(model.Branch)) { TempData["status"] = "Exists"; return View(); } _manager.CreateBranch(model); TempData["status"] = "Success"; return View(); }
public int UpdateBranch(FCLBranch branch) { var x = _db.FCLBranches.Find(branch.Id); if (branch.Branch == x.Branch) return 1; x.Branch = branch.Branch; return _db.SaveChanges(); }
public int CreateBranch(FCLBranch x) { _db.FCLBranches.Add(x); return _db.SaveChanges(); }