Exemple #1
0
        async void btnView_Clicked(object sender, System.EventArgs e)
        {
            try
            {
                DataRow row;
                if (RowHandle >= 0)
                {
                    row = (gData.ItemsSource as DataTable).Rows[RowHandle];
                    if (row == null)
                    {
                        return;
                    }
                }
                else
                {
                    row = (gData.ItemsSource as DataTable).Rows[0];
                    if (row == null)
                    {
                        return;
                    }
                }
                var _detailPage = new RespondentDetailPage(Services, row, tblQuota, tblHanhChanh, tblNhanSu, ProjectID, row["AnswerID"].ToString());
                _detailPage.Saved += DetailPage_Saved;

                await Application.Current.MainPage.Navigation.PushAsync(_detailPage);
            }
            catch (Exception ex)
            {
                Device.BeginInvokeOnMainThread(() =>
                {
                    DisplayAlert("Lỗi chọn", "Chạm một dòng dữ liệu để xem lại", "OK");
                });
            }
        }
Exemple #2
0
        async void btnNew_Clicked(object sender, System.EventArgs e)
        {
            var _detailPage = new RespondentDetailPage(Services, null, tblQuota, tblHanhChanh, tblNhanSu, ProjectID, Guid.NewGuid().ToString());

            _detailPage.Saved += DetailPage_Saved;
            await Application.Current.MainPage.Navigation.PushAsync(_detailPage);

            UserDialogs.Instance.HideLoading();
        }