示例#1
0
        public AuthentificationViewModel(INavigation nav)
        {
            Title       = "First Page";
            _nav        = nav;
            CurrentPage = DependencyInject <AuthentificationViewPage> .Get();

            OpenPage();
            this.Msg = Msg;
        }
示例#2
0
        public EditingViewModel(INavigation nav)
        {
            this.Employee = Employee;

            Title       = "Add employee ";
            _nav        = nav;
            CurrentPage = DependencyInject <Views.EditingViewPage> .Get();

            OpenPage();
        }
示例#3
0
        public InscriptionViewModel(INavigation nav)
        {
            this.Admin = Admin;

            Title       = "Inscription ";
            _nav        = nav;
            CurrentPage = DependencyInject <Views.InscriptionViewPage> .Get();

            OpenPage();
        }
示例#4
0
        public DetailsViewModel(INavigation nav, Employee employee)
        {
            this.Employee    = employee;
            this.Text        = employee.Text;
            this.Description = employee.Description;
            Title            = employee.Text;
            _nav             = nav;
            CurrentPage      = DependencyInject <Views.DetailsViewPage> .Get();

            OpenPage();
        }
示例#5
0
        public EditingViewModel(INavigation nav, Employee employee)
        {
            Title       = "Edit Employee ";
            _nav        = nav;
            CurrentPage = DependencyInject <Views.EditingViewPage> .Get();

            OpenPage();
            // taken the information from the previeus page
            this.Employee    = employee;
            this.Id          = employee.Id;
            this.Text        = employee.Text;
            this.Description = employee.Description;
        }
示例#6
0
        public ListViewModel(INavigation nav)
        {
            Title       = "List of the employee ";
            _nav        = nav;
            CurrentPage = DependencyInject <ListViewPage> .Get();

            OpenPage();

            this.SelectedEmployee = _selectedEmployee;
            ListEmployees         = new ObservableCollection <Employee>();
            this.SearchText       = SearchText;

            LoadEmployeesCommand = new Command(async() => await ExecuteLoadEmployeesCommand());
            Console.WriteLine("the number of employee " + ListEmployees.Count);
            if (ListEmployees.Count == 0)
            {
                LoadEmployeesCommand.Execute(null);
            }
        }