//get childs of specific mother public List <Child> getChildList(Mother mother) { return(dal.getChildList(mother)); }
public int addMother(Mother m) { IDal dal = DAL.FactorysingletonDal.getInstance; return(dal.addMother(m)); }
public bool EsCompatible(Mother motherboard) { return(DDR4oDDR3 == motherboard.PedirDDR4oDDR3); }
public void addMother(Mother mom) { dal.addMother(mom); }
public Task BindModelAsync(ModelBindingContext bindingContext) { var modelName = bindingContext.BinderModelName; var modelNameCheckValue = bindingContext.ValueProvider.GetValue("Has" + modelName); if (!bool.Parse(modelNameCheckValue.FirstValue)) { return(Task.CompletedTask); } var firstName = bindingContext.ValueProvider.GetValue(modelName + ".FirstName"); var lastName = bindingContext.ValueProvider.GetValue(modelName + ".LastName"); var alive = bindingContext.ValueProvider.GetValue(modelName + ".Alive"); var age = bindingContext.ValueProvider.GetValue(modelName + ".Age"); var employer = bindingContext.ValueProvider.GetValue(modelName + ".Employer"); var annualIncome = bindingContext.ValueProvider.GetValue(modelName + ".AnnualIncome"); bindingContext.ModelState.SetModelValue(modelName + ".FirstName", firstName); bindingContext.ModelState.SetModelValue(modelName + ".LastName", lastName); bindingContext.ModelState.SetModelValue(modelName + ".Alive", alive); bindingContext.ModelState.SetModelValue(modelName + ".Age", age); bindingContext.ModelState.SetModelValue(modelName + ".Employer", employer); bindingContext.ModelState.SetModelValue(modelName + ".AnnualIncome", annualIncome); switch (modelName) { case "Father": Father father = new Father() { FirstName = firstName.FirstValue, LastName = lastName.FirstValue, Alive = bool.Parse(alive.FirstValue), Age = int.Parse(age.FirstValue), Employer = employer.FirstValue, AnnualIncome = decimal.Parse(annualIncome.FirstValue) }; bindingContext.Result = ModelBindingResult.Success(father); break; case "Mother": Mother mother = new Mother() { FirstName = firstName.FirstValue, LastName = lastName.FirstValue, Alive = bool.Parse(alive.FirstValue), Age = int.Parse(age.FirstValue), Employer = employer.FirstValue, AnnualIncome = decimal.Parse(annualIncome.FirstValue) }; bindingContext.Result = ModelBindingResult.Success(mother); break; case "Guardian": Guardian guardian = new Guardian() { FirstName = firstName.FirstValue, LastName = lastName.FirstValue, Alive = bool.Parse(alive.FirstValue), Age = int.Parse(age.FirstValue), Employer = employer.FirstValue, AnnualIncome = decimal.Parse(annualIncome.FirstValue) }; bindingContext.Result = ModelBindingResult.Success(guardian); break; } return(Task.CompletedTask); }
public void Update_Mother(Mother m) { Remove_Mother(m); Add_Mother(m); }
public void AddMother(Mother newmother) { Idal mydal = FactoryDal.getDal(); //send to layer layer DAL mydal.AddMother(newmother); }
public void UpdateMother(Mother newmother) { Idal mydal = FactoryDal.getDal(); mydal.UpdateMother(newmother); }
public Mother GetMotherByID(string ID)//Get Mother By ID { Mother mother = GetMothers().Find(x => x.ID == ID); return(mother); }
public List <Child> GetChildsByMother(Mother mother) { Idal mydal = FactoryDal.getDal(); return(mydal.GetChildsByMother(mother)); }
/// <summary> /// checks if the nanny is in the search area of the mother /// </summary> /// <param name="mother"></param> /// <param name="nAddress"></param> /// <returns></returns> private static bool NannyInRange(Mother mother, string nAddress) { return(CalculateDistance(mother.SearchArea ?? mother.Address, nAddress) <= mother.MaxDistance); }