예제 #1
0
        public EmployeeListViewPage()
        {

            BindingContext = new EmployeeViewModel();
            var activity = new ActivityIndicator
            {
                HorizontalOptions = LayoutOptions.CenterAndExpand,
                Color = Color.White,
                //IsEnabled = true
            };
            activity.SetBinding(ActivityIndicator.IsVisibleProperty, "IsBusy");
            activity.SetBinding(ActivityIndicator.IsRunningProperty, "IsBusy");

            //Command
            ViewModel.LoadAllEmployees.Execute(null);

            _iiEmpList = new iiListView()
            {
                ItemTemplate = new DataTemplate(typeof(EmployeeNameCell)),
                ClassId="1",    
                RowHeight=70
            };
            Content = new StackLayout
            {
                Children = {
                    activity,
					_iiEmpList
				}
            };
            _iiEmpList.ItemTapped += _iiEmpList_ItemTapped;
        }
예제 #2
0
        public BalanceLeaveViewPage()
        {
            BindingContext = new EmployeeViewModel();
            var activity = new ActivityIndicator
            {
                HorizontalOptions = LayoutOptions.CenterAndExpand,
                Color = Color.White.ToFormsColor(),
                //IsEnabled = true
            };
            activity.SetBinding(ActivityIndicator.IsVisibleProperty, "IsBusy");
            activity.SetBinding(ActivityIndicator.IsRunningProperty, "IsBusy");
            ViewModel.LoadAllEmployees.Execute(null);
            listView = new iiListView()
            {
                ItemTemplate = new DataTemplate(typeof(NameCell))
            };

            BackgroundImage = "back";
            Content = new StackLayout
            {
                // HorizontalOptions = LayoutOptions.FillAndExpand,
                Padding = new Thickness(20, 70, 20, 20),
                Spacing=20,
                Children = 
                {
                    activity,  
                    listView,
                    GenCalGrid(),
                }
            };
            listView.ItemTapped += listView_ItemTapped;
        }
예제 #3
0
        public NotificationViewPage()
        {
            ViewModel = ViewModel ?? new EmployeeViewModel();
            ViewModel.LoadAllEmployees.Execute(null);
            _iiEmpList = new iiListView()
            {
                ItemTemplate = new DataTemplate(typeof(NotificationViewCell)),
                RowHeight = 80,
                ClassId = "1",
            };

            Content = new StackLayout
            {
                Children = {
					_iiEmpList
				}
            };
        }
예제 #4
0
 public EmployeeDetailsPage(Int32 _id, EmployeeViewModel _viewModel)
 {
     ViewModel = _viewModel; //Passed from List or Dashboard
     _EmployeeID = _id;
     BackgroundImage = "back";
     BindingContext = ViewModel.EmployeeDetail;
     ViewModel.LoadEmpDetail.Execute(_EmployeeID);
     Content = new StackLayout
     {
         HorizontalOptions = LayoutOptions.FillAndExpand,
         Spacing = 10,
         Padding = new Thickness(0, 0, 0, 0),
         Children = 
         {
             {CreateRealtiveLayoutFor()},
             Layout(),
         }
     };
 }       
예제 #5
0
		public LoginViewModel(INavigation navigation)
		{
			this.iiNavigation = navigation;
			EmpViewModel = new EmployeeViewModel();

		}
        StackLayout BalanceLeaveLayout()
        {
            BindingContext = new EmployeeViewModel();
            var activity = new ActivityIndicator
            {
                HorizontalOptions = LayoutOptions.CenterAndExpand,
                Color = Color.White.ToFormsColor(),
                //IsEnabled = true
            };
            activity.SetBinding(ActivityIndicator.IsVisibleProperty, "IsBusy");
            activity.SetBinding(ActivityIndicator.IsRunningProperty, "IsBusy");

            ViewModel.LoadAllEmployees.Execute(null);
            ViewModel.LoadHolidayDetail.Execute(null);
            listView = new iiListView()
            {
                ItemTemplate = new DataTemplate(typeof(EmployeeViewCell)),
                ClassId = "2"
            };
            var listStack = new StackLayout
            {
                Padding = new Thickness(50, 0, 50,0),
                Children = { listView }
            };
            var BalanceLeaveTabView = new StackLayout
            {
                // HorizontalOptions = LayoutOptions.FillAndExpand,
                Padding = new Thickness(20, 0, 20, 10),
                //Spacing = 20,
                Children =
				{
					activity,  
                    listStack,
                    GenCalGrid(),
				}
            };
            return BalanceLeaveTabView;
        }