public void hastaBilgiDoldur() { lblHastaAd.Text = ": " + hasta.FirstName; lblHastaSoyad.Text = ": " + hasta.LastName; lblHastaMail.Text = ": " + hasta.Email; lblHastaTc.Text = ": " + hasta.NationalIdentity; lblHastaTel.Text = ": " + hasta.PhoneNumber; int hastaId = userManager.GetAll().SingleOrDefault(p => p.NationalIdentity == hasta.NationalIdentity).Id; string bosluk = "\n-----------------------------------------------------------------------------------\n"; hastaDetay = patientManager.Get(new Patient { Id = hastaId }); rchHastaSikayet.Text = hastaDetay.PatientDescription; cmbDiyetTuru.Text = dietManager.Get(new Diet { DietId = hastaDetay.DietId }).DietName; hastaDietDetay = dietCalendarManager.Get(new DietCalendar { DietId = hastaDetay.DietId }); rchDiyet.Text = hastaDietDetay.Pazartesi + bosluk + hastaDietDetay.Sali + bosluk + hastaDietDetay.Carsamba + bosluk + hastaDietDetay.Persembe + bosluk + hastaDietDetay.Cuma + bosluk + hastaDietDetay.Cumartesi + bosluk + hastaDietDetay.Pazar; }
public IActionResult CreateShoppingList(ShoppingListViewModel model) { if (ModelState.IsValid) { //TODO: add methods to validate selecteddays format var daysArray = Array.ConvertAll(model.SelectedDays.Trim().Split(','), int.Parse); var dietCalendar = new DietCalendar(model.SelectedFile); var shoppingList = new Models.ShoppingList(dietCalendar, daysArray); return(View(shoppingList)); } return(View("Index")); }
public bool Delete(DietCalendar entity) { return(_dietCalendarDal.Delete(entity)); }
public bool Update(DietCalendar entity) { return(_dietCalendarDal.Update(entity)); }
public bool Add(DietCalendar entity) { return(_dietCalendarDal.Add(entity)); }
public DietCalendar Get(DietCalendar entity) { return(_dietCalendarDal.Get(p => p.DietId == entity.DietId)); }