public void DeleteBackgroundInfo(int? id) { BackgroundInfoBusinessLayer biBal = new BackgroundInfoBusinessLayer(); biBal.DeleteBackgroundInfoByID(id); }
public void UpdateBackgroundInfo(BackgroundInfo BackgroundInfoClient) { BackgroundInfoBusinessLayer biBal = new BackgroundInfoBusinessLayer(); biBal.UpdateBackgroundInfo(BackgroundInfoClient); }
public void AddBackgroundInfo(BackgroundInfo BackgroundInfoClient) { var manager = new UserManager<ApplicationUser>(new UserStore<ApplicationUser>(new ApplicationDbContext())); var currentUser = manager.FindById(User.Identity.GetUserId()); int id = currentUser.UserInfo.Id; BackgroundInfo bi = new BackgroundInfo(); bi.UserInfoID = id; bi.title = BackgroundInfoClient.title; bi.type = BackgroundInfoClient.type; bi.startDate = BackgroundInfoClient.startDate; bi.endDate = BackgroundInfoClient.endDate; bi.description = BackgroundInfoClient.description; bi.isCurrentPosition = false; BackgroundInfoBusinessLayer biBal = new BackgroundInfoBusinessLayer(); biBal.InsertBackgroundInfo(bi); }
public ActionResult GetBackgroundInfoByInfoID(int? id) { BackgroundInfoBusinessLayer biBal = new BackgroundInfoBusinessLayer(); return Json(biBal.GetBackgroundInfoByInfoID(id), JsonRequestBehavior.AllowGet); }
public List<BackgroundInfo> GetBackgroundInfo(int? id, Boolean isCurrentPosition) { BackgroundInfoBusinessLayer bibl = new BackgroundInfoBusinessLayer(); List<BackgroundInfo> BackgroundInfoes = bibl.GetBackgroundInfoByID(id, isCurrentPosition); return BackgroundInfoes; }