public int GetSecretOf(MotherClass mother) { // accessible since we are inside the MotherClass return mother._secret; }
public int GetSecretOf(MotherClass mother) { // accessible since we are inside the MotherClass return(mother._secret); }
public ActionResult GetById(string eventName, String name, String middleName, String lastName, String Address, String id, String ContactNumber, String Spouse, String Mother, String Father, String Age, String Occupation) { var item = TodoItems; var defaultResponse = new MotherClass(); if (eventName == "FindAll") { var events = item.FindAll(); if (events == null) { return(NotFound()); } return(new ObjectResult(events)); } else if (eventName == "Login") { var events = item.Login(name, middleName); if (events == null) { return(NotFound()); } return(new ObjectResult(events)); } else if (eventName == "Find") { var events = item.Find(id); if (events == null) { return(NotFound()); } return(new ObjectResult(events)); } else if (eventName == "Remove") { var events = item.Remove(id); if (events == null) { return(NotFound()); } return(new ObjectResult(events)); } else if (eventName == "Update") { var events = item.Update(name, middleName, lastName, Address, id, ContactNumber, Spouse, Mother, Father, Age, Occupation); if (events == null) { return(NotFound()); } return(new ObjectResult(events)); } else if (eventName == "Add") { var events = item.Add(name, middleName, lastName, Address, id, ContactNumber, Spouse, Mother, Father, Age, Occupation); if (events == null) { return(NotFound()); } return(new ObjectResult(events)); } else { defaultResponse.responseCode = "124002"; defaultResponse.responseMessage = "Invalid entry"; } return(new ObjectResult(defaultResponse)); }