public String Info() { String Title = $"==============\nPerfume Info for {Name}\n--------------\n"; String NameLine = $"Name : {Name}\n"; String GenderLine = $"Gender : {Gender.ToString()}\n"; String AccordsLine = ""; foreach (KeyValuePair <String, int> accord_info in Accords) { AccordsLine = $"{AccordsLine}{accord_info.Key} : {accord_info.Value}\n"; } String Info = $"{Title}{NameLine}{GenderLine}{AccordsLine}"; return(Info); }
private void OnSubmitButtonClick() { if (!Check()) { print("Check faild"); return; } print("Succ"); DateTime checkInTime = datePicker.SelectedDate.Date; EGender gender = toggleF.isOn ? EGender.Female : EGender.Male; String name = nameInputField.text.Trim(); ENational national = (ENational)nationalityDropdown.value; String identity = passportInputField.text.Trim(); Debug.Log(string.Format("CheckInTime: {0} Gender: {1} Name: {2} National: {3} Identity: {4}", checkInTime.ToString(), gender.ToString(), name, national.ToString(), identity)); Customer addCustomer = new Customer() { Name = name, Gender = gender, CheckInTime = checkInTime, National = national, Identity = identity, RoomInfo = RoomInfoInputField.text }; bool succ = StorageManager.AddCoustomer(addCustomer); string displayStr = succ ? "加入成功" : "加入失敗"; NativeManager.ShowToast(displayStr); print(displayStr); // List<Customer> assignList = StorageManager.GetAssign (searchCustomer); // revealPanelGO.gameObject.SetActive (true); // revealPanel.SetData (assignList); }
private void OnSubmitButtonClick() { if (!Check()) { print("Check faild"); return; } print("Succ"); DateTime checkInTime = isSelectedDate ? datePicker.SelectedDate.Date : default(DateTime); EGender gender = GetGender(); String name = nameInputField.text.Trim(); ENational national = (ENational)nationalityDropdown.value; String identity = passportInputField.text.Trim(); Debug.Log(string.Format("CheckInTime: {0} Gender: {1} Name: {2} National: {3} Identity: {4}", checkInTime.ToString(), gender.ToString(), name, national.ToString(), identity)); Customer searchCustomer = new Customer() { Name = name, Gender = gender, CheckInTime = checkInTime, National = national, Identity = identity }; List <Customer> assignList = StorageManager.GetAssign(searchCustomer); revealPanelGO.gameObject.SetActive(true); revealPanel.SetData(assignList); }