void SetBirthdateTitle() { string[] birthArray = null; try { birthArray = MyBirthdate.Split('-'); } catch { return; } try { _birthdateValueTv.Text = birthArray[2] + "." + birthArray[1] + "." + birthArray[0]; } catch { _birthdateValueTv.Text = MyBirthdate; } //var ddtime = new DatePickerDialog(this, OnDateSet, Convert.ToInt32(birth_array[2]), Convert.ToInt32(birth_array[1]), //Convert.ToInt32(birth_array[0]) //); if (_ddtime == null) { _ddtime = new DatePickerDialog(this, OnDateSet, DateTime.Today.Year, DateTime.Today.Month - 1, DateTime.Today.Day ); } try { _selectedDate = new DateTime(year: Convert.ToInt32(birthArray[0]), month: Convert.ToInt32(birthArray[1]), day: Convert.ToInt32(birthArray[2])); //DatePickerDialog(this, ) _ddtime.DatePicker.DateTime = _selectedDate; } catch { } }
private async Task <bool> CacheData() { // Clean folder first of all. await _nativeMethods.RemovePersonalImages(); // -1 because we always have null at index 0 of this list. int count = -1; foreach (var bitmap in PersonalImageAdapter.Photos) { if (bitmap != null) { var res = await _nativeMethods.CachePersonalImage(bitmap, count); } count++; } if (MyBirthdate != null) { try { var split = MyBirthdate.Split('.'); MyBirthdate = split[1] + "-" + split[0] + "-" + split[2]; } catch (Exception ex) { } } _databaseMethods.InsertUsersCard( MyName, MySurname, MyMiddlename, MyPhone, MyEmail, MyHomePhone, MySite, MyDegree, MyCardName, MyBirthdate, HomeAddressActivity.MyCountry, HomeAddressActivity.MyRegion, HomeAddressActivity.MyCity, HomeAddressActivity.FullAddressStatic, HomeAddressActivity.MyIndex, HomeAddressActivity.MyNotation, NewCardAddressMapActivity.Lat, NewCardAddressMapActivity.Lng ); return(true); }