public bool DeleteWoredaHub(WoredaHub woredaHub) { if (woredaHub == null) { return(false); } _unitOfWork.WoredaHubRepository.Delete(woredaHub); _unitOfWork.Save(); return(true); }
public static WoredaHubViewModel WoredaHubViewModelBinder(WoredaHub woredaHub) { return(new WoredaHubViewModel { WoredaHubID = woredaHub.WoredaHubID, WoredaHubName = woredaHub.StartDate + " - " + woredaHub.Status, HRDID = woredaHub.HRDID, HRD = _hrdService.FindById(woredaHub.HRDID).Season.Name + " - " + _hrdService.FindById(woredaHub.HRDID).Year, PlanID = woredaHub.PlanID, Plan = _planService.FindById(woredaHub.PlanID).PlanName, StartDate = woredaHub.StartDate, EndDate = woredaHub.EndDate, Status = woredaHub.Status }); }
public static WoredaHub WoredaHubListBinder(WoredaHubViewModel model) { if (model == null) { return(null); } var woredaHub = new WoredaHub() { WoredaHubID = model.WoredaHubID, HRDID = model.HRDID, PlanID = model.PlanID, StartDate = model.StartDate, EndDate = model.EndDate, Status = model.Status }; return(woredaHub); }
public bool EditWoredaHub(WoredaHub woredaHub) { _unitOfWork.WoredaHubRepository.Edit(woredaHub); _unitOfWork.Save(); return(true); }
public bool AddWoredaHub(WoredaHub woredaHub) { _unitOfWork.WoredaHubRepository.Add(woredaHub); _unitOfWork.Save(); return(true); }