protected override void OnBindingContextChanged() { model = (ViewAttendanceModel)BindingContext; base.OnBindingContextChanged(); StackLayout stack = CreateViewAttendanceCellLayout(); View = stack; }
public void LoadData(int startDate, int endDate) { Device.BeginInvokeOnMainThread(async() => { try { _Loader.IsShowLoading = true; //Service call List <ViewAttendanceModel> lstStudentAttendanceModel = new List <ViewAttendanceModel>(); lstStudentAttendanceModel = await ViewAttendanceModel.GetStudentAttendance(startDate, endDate); if (lstStudentAttendanceModel != null) { Items = new ObservableCollection <ViewAttendanceModel>(lstStudentAttendanceModel); StudentAttendanceListView.ItemsSource = Items; grid.IsVisible = true; spDisplayHeader.IsVisible = true; _NotAvailData.IsVisible = false; } else { Items = null; _NotAvailData.IsVisible = true; grid.IsVisible = false; spDisplayHeader.IsVisible = false; } _Loader.IsShowLoading = false; } catch (Exception ex) { } }); }