//public delegate void UpdateOrInsert(object sender, EventArgs s); //public List<string> PickerStrings { get; set; } //public string Methods { get; set; } public NewItemPage(Tra_Income viewdata = null) { InitializeComponent(); ItemsViewModel item = new ItemsViewModel(); PickerList = item.Get_Picker_List().ToList(); this.MyPicker.Title = "選択してください"; if (viewdata == null) { Item = new Tra_Income(); Item.Payment_Date = DateTime.Today; Selected = 0; this.button.Clicked += Save_Clicked; } else { Item = viewdata; Selected = viewdata.Income_Id - 1; this.button.Clicked += Update_Clicked; } BindingContext = this; }