Beispiel #1
0
        private void DoFeedDepartmentComboBox()
        {
            var department = ConnectionController.GetInstance().Departments.ToList();

            departments = department;
            DataContext = departments;
        }
Beispiel #2
0
        private void DoFeedRideTypeComboBox()
        {
            var rideType = ConnectionController.GetInstance().RideTypes.ToList();

            rideTypes   = rideType;
            DataContext = rideTypes;
        }
Beispiel #3
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            RequestWindowFeature(WindowFeatures.NoTitle);
            SetContentView(Resource.Layout.AuthActivity);
            DroidDAL.HockeyAppRegister(this);

            _view = FindViewById <AuthView>(Resource.Id.auth_view);

            InitStatusBar();

            ThemeHolder.Init(DataService.RepositoryController.RepositoryThemes);
            _interactor = new InteractorAuth(new AuthController(ConnectionController.GetInstance(), WebMsgParser.ParseResponseAuth), new ValidationRA());
#if MOCK
            _presenter = new PresenterAuthMOCK(_view, _interactor, new RouterAuth(this), FacebookCallLoginAction, GoogleCallLoginAction, VkCallLoginAction, OkCallLoginAction,
                                               new AuthStylesHolderDroid <GlobalControlsTheme>(new ThemeParser <GlobalControlsTheme>()), DataService.RepositoryController.RepositoryRA.LangRA);
#else
            _presenter = new PresenterAuth(_view, _interactor, new RouterAuth(this), FacebookCallLoginAction, GoogleCallLoginAction, VkCallLoginAction, OkCallLoginAction,
                                           new AuthStylesHolderDroid <GlobalControlsTheme>(new ThemeParser <GlobalControlsTheme>()), DataService.RepositoryController.RepositoryRA.LangRA);
#endif
            _presenter.SetConfig();

            _callbackManager  = CallbackManagerFactory.Create();
            _facebookCallback = new FacebookCallback(_interactor);
            LoginManager.Instance.RegisterCallback(_callbackManager, _facebookCallback);
            _interactor.OnSocialLogOut += SocialLogOut;
        }
Beispiel #4
0
        private void LogOut()
        {
            DataService.RepositoryController.Init();
            ConnectionController.GetInstance().DisconnectSockets();

            var locale = Localization.Lang as IAlert;

            AlertDialog.Builder alert = new AlertDialog.Builder(this);

            alert.SetMessage(locale.BadToken);

            alert.SetPositiveButton(locale.OK, (senderAlert, args) =>
            {
                FinishAffinity();
                Intent intent = new Intent(ApplicationContext, typeof(AuthActivity));
                intent.AddFlags(ActivityFlags.ClearTop);
                StartActivity(intent);
            });

            Dialog dialog = alert.Create();

            if (!IsFinishing)
            {
                RunOnUiThread(() =>
                {
                    dialog.Show();
                });
            }
        }
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            _updatePostView.NavigationBar  = NavigationController?.NavigationBar;
            _updatePostView.NavigationItem = NavigationItem;
            _updatePostView.SetConfigToolbar();

            _interactor = new InteractorUpdatePost(PostId, new UpdatePostController(ConnectionController.GetInstance(), WebMsgParser.ParseResponseCreatePost, DataService.NotificationCenter,
                                                                                    DataService.RepositoryController.RepoQc, DataService.RepositoryController.RepositoryPost), DataService.RepositoryController.RepositoryUpdatePost,
                                                   DataService.RepositoryController.RepositoryPost, DataService.RepositoryController.RepositoryUserAuth);

            _presenter = new PresenterUpdatePost(_updatePostView, _interactor, new RouterUpdatePost(this), new UpdatePostStylesHolderIOS <GlobalControlsTheme>(iOS_DAL.ThemeParser), Localization.Lang);


            ImagePicker = new ImagePickerDispatcher
            {
                OnGetImageFromGallery = (imageString) =>
                {
                    _presenter.ImageSelected(imageString);
                }
            };

            HideShowKeyboard hideShowKeyboard = new HideShowKeyboard(_updatePostView);

            NSNotificationCenter.DefaultCenter.AddObserver(UIKeyboard.DidShowNotification, hideShowKeyboard.KeyBoardUpNotification);
            NSNotificationCenter.DefaultCenter.AddObserver(UIKeyboard.WillHideNotification, hideShowKeyboard.KeyBoardDownNotification);
        }
Beispiel #6
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            _interactor = new InteractorRegPass(new RegController(ConnectionController.GetInstance(), WebMsgParser.ParseResponseReg), DataService.RepositoryController.RepositoryRA, new ValidationRA());
            _presenter  = new PresenterRegPass(_registrationPassword, _interactor, new RouterRegPass(this), new RegPassStylesHolderIOS <GlobalControlsTheme>(new ThemeParser <GlobalControlsTheme>()), DataService.RepositoryController.RepositoryRA.LangRA);
            _presenter.SetConfig();
        }
        private void DoLoadTableData()
        {
            var responseDetails = (from x in ConnectionController.GetInstance().HeaderResponses select new {
                Id = x.Id,
                RideName = x.Ride.RideName,
                ResponseStatus = x.ResponseStatus
            }).Where(x => x.ResponseStatus.Equals("Approved") || x.ResponseStatus.Equals("Declined")).ToList();

            managerResponseTable.ItemsSource = responseDetails;
        }
Beispiel #8
0
        public override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
#if MOCK
            _postsController = new ConnectionControllerMOCK();
#else
            _postsController = new PostsController(ConnectionController.GetInstance(), WebMsgParser.ParseResponsePosts, DataService.RepositoryController.RepositoryPost);
#endif
            _globalTimer = GlobalTimer.GetInstance();
        }
Beispiel #9
0
        private void DoLoadTableData()
        {
            var orderDetails = (from x in ConnectionController.GetInstance().Tables
                                select new
            {
                TableNumber = x.Id,
                TableStatus = x.TableStatus
            }).ToList();

            orderRequestTable.ItemsSource = orderDetails;
        }
Beispiel #10
0
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            _view = inflater.Inflate(Resource.Layout.RegPassFragment, container, false);

            var viewRegPass = _view.FindViewById <RegPassView>(Resource.Id.reg_pass_view);

            _interactor = new InteractorRegPass(new RegController(ConnectionController.GetInstance(), WebMsgParser.ParseResponseReg), DataService.RepositoryController.RepositoryRA, new ValidationRA());
            _presenter  = new PresenterRegPass(viewRegPass, _interactor, new RouterRegPass(Activity), new RegPassStylesHolderDroid <GlobalControlsTheme>(new ThemeParser <GlobalControlsTheme>()), DataService.RepositoryController.RepositoryRA.LangRA);

            return(_view);
        }
        private void DoLoadTableData()
        {
            var ideaDetails = (from x in ConnectionController.GetInstance().RequestRaiseSalaries
                               select new
            {
                Id = x.Id,
                EmployeeId = x.EmployeeTargetId,
                RaiseSalary = x.EmployeeRaisePrice,
                Status = x.ResponseStatus
            }).Where(x => x.Status.Equals("Waiting")).ToList();

            salaryRequestTable.ItemsSource = ideaDetails;
        }
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            _view           = inflater.Inflate(Resource.Layout.CreatePostFragment, container, false);
            _createPostView = _view.FindViewById <CreatePostView>(Resource.Id.createPost_view);

            _interactor = new InteractorCreatePost(new CreatePostController(ConnectionController.GetInstance(), WebMsgParser.ParseResponseCreatePost, DataService.NotificationCenter,
                                                                            DataService.RepositoryController.RepoQc), DataService.RepositoryController.RepositoryCreatePost, DataService.RepositoryController.RepositoryUserAuth);

            _presenter = new PresenterCreatePost(_createPostView, _interactor, new RouterCreatePost(this), new CreatePostStylesHolderDroid <GlobalControlsTheme>(new ThemeParser <GlobalControlsTheme>()), Localization.Lang);

            _presenter.SetConfig();
            return(_view);
        }
Beispiel #13
0
        private void DoLoadTableData()
        {
            var orderDetails = (from x in ConnectionController.GetInstance().Foods
                                select new
            {
                FoodId = x.Id,
                FoodName = x.FoodName,
                FoodPrice = x.FoodPrice,
                FoodDescription = x.FoodDescription
            }).ToList();

            orderRequestTable.ItemsSource = orderDetails;
        }
        private void DoLoadTableData()
        {
            var ideaDetails = (from x in ConnectionController.GetInstance().ResignRequests
                               select new
            {
                Id = x.Id,
                EmployeeName = x.Employee.EmployeeFullname,
                ResignDate = x.ResignDate,
                ResignLetter = x.ResignLetter,
                Status = x.ResignResponse
            }).Where(x => x.Status.Equals("Waiting")).ToList();

            resignRequestTable.ItemsSource = ideaDetails;
        }
        private void DoLoadTableData()
        {
            var leavingDetails = (from x in ConnectionController.GetInstance().ResignRequests
                                  select new
            {
                Id = x.EmployeeId,
                ResignName = "You",
                ResignLetter = x.ResignLetter,
                ResignDate = x.ResignDate,
                ResignResponse = x.ResignResponse
            }).Where(x => x.Id.Equals(userId)).ToList();

            leavingTable.ItemsSource = leavingDetails;
        }
        private void DoLoadTableData()
        {
            var responseDetails = (from x in ConnectionController.GetInstance().HeaderFundRequests
                                   select new
            {
                Id = x.Id,
                MoneyAsk = x.PriceValue,
                EmployeeFrom = x.Employee.EmployeeFullname,
                DepartmentFrom = x.Employee.Department.DepartmentName,
                Status = x.ResponseStatus
            }).Where(x => x.Status.Equals("Waiting")).ToList();

            responseTable.ItemsSource = responseDetails;
        }
        private void DoLoadTableData()
        {
            var rideDetails = (from x in ConnectionController.GetInstance().Rides select new {
                Id = x.Id,
                RideName = x.RideName,
                RideDurabilityCheckEachWeek = x.RideDurabilityCheckPerWeek,
                RideStatus = x.RideStatus,
                RideMaintainStatus = x.RideMaintainStatus,
                RideTypeName = x.RideType.RideTypeName,
                RideSafetyName = x.RideSafety.RideSafetyName,
                RideForce = x.RideForce,
            }).ToList();

            rideTable.ItemsSource = rideDetails;
        }
Beispiel #18
0
        private void DoLoadTableData()
        {
            var scheduleDetails = (from x in ConnectionController.GetInstance().HeaderMaintenances
                                   select new
            {
                Id = x.Id,
                RideName = x.Ride.RideName,
                StartDate = x.StartTime,
                EndDate = x.EndTime,
                MaintenanceStatus = x.Ride.RideMaintainStatus,
                EmployeeResponsbility = x.Employee.EmployeeFullname,
            }).ToList();

            scheduleTable.ItemsSource = scheduleDetails;
        }
        private void DoLoadTableData()
        {
            var leavingDetails = (from x in ConnectionController.GetInstance().LeavingPermissions
                                  select new
            {
                Id = x.EmployeeId,
                LeavingName = "You",
                LeavingReason = x.Reason,
                LeavingStartDate = x.StartDate,
                LeavingEndDate = x.EndDate,
                LeavingStatus = x.ResponseStatus
            }).Where(x => x.Id.Equals(userId)).ToList();

            leavingTable.ItemsSource = leavingDetails;
        }
Beispiel #20
0
        private void DoLoadTableData()
        {
            var ideaDetails = (from x in ConnectionController.GetInstance().HeaderResponses
                               select new
            {
                Id = x.Id,
                RideName = x.Ride.RideName,
                RideSafety = x.Ride.RideSafety.RideSafetyName,
                RideType = x.Ride.RideType.RideTypeName,
                IdeaFrom = x.Employee.EmployeeFullname,
                Status = x.ResponseStatus
            }).Where(x => x.Status.Equals("Waiting")).ToList();

            rideIdeaTable.ItemsSource = ideaDetails;
        }
Beispiel #21
0
        private void DoLoadTableData()
        {
            var responseDetails = (from x in ConnectionController.GetInstance().HeaderFundRequests
                                   select new
            {
                Id = x.Id,
                PriceRequested = x.PriceValue,
                Reason = x.Description,
                RequestBy = x.Employee.EmployeeFullname,
                DepartmentFrom = x.Employee.Department.DepartmentName,
                ResponseStatus = x.ResponseStatus
            }).ToList();

            responseTable.ItemsSource = responseDetails;
        }
Beispiel #22
0
        private void DoLoadTableData()
        {
            var orderDetails = (from x in ConnectionController.GetInstance().OrderRequests
                                select new
            {
                Id = x.Id,
                CustomerId = x.CustomerId,
                CustomerName = x.Customer.CustomerFullname,
                FoodName = x.OrderDetails.Where(y => y.Id.Equals(x.Id)).FirstOrDefault().Food.FoodName,
                FoodQuantity = x.OrderDetails.Where(y => y.Id.Equals(x.Id)).FirstOrDefault().Quantity,
                OrderTable = x.TableNumber,
                Status = x.OrderStatus
            }).Where(x => x.Status.Equals("Waiting")).ToList();

            orderRequestTable.ItemsSource = orderDetails;
        }
Beispiel #23
0
        private void DoLoadTableData()
        {
            var requestDetails = (from x in ConnectionController.GetInstance().HeaderPurchaseRequests
                                  select new
            {
                Id = x.Id,
                Item = x.ItemPiece.ItemName,
                ItemQuantity = x.Quantity,
                ItemDescription = x.ItemPiece.ItemDescription,
                RequestBy = x.Employee.EmployeeFullname,
                DepartmentFrom = x.Employee.Department.DepartmentName,
                Status = x.ResponseStatus
            }).Where(x => x.Status.Equals("Waiting")).ToList();

            requestTable.ItemsSource = requestDetails;
        }
        private void DoLoadTableData()
        {
            var leavingDetails = (from x in ConnectionController.GetInstance().LeavingPermissions
                                  select new
            {
                Id = x.Id,
                EmlpoyeeId = x.EmployeeId,
                EmployeeName = x.Employee.EmployeeFullname,
                EmployeeReason = x.Reason,
                LeavingStartDate = x.StartDate,
                LeavingEndDate = x.EndDate,
                LeavingStatus = x.ResponseStatus
            }).Where(x => x.LeavingStatus.Equals("Waiting")).ToList();

            leavingTable.ItemsSource = leavingDetails;
        }
        private void DoCreateOrder(object sender, RoutedEventArgs e)
        {
            int id;

            Int32.TryParse(idText.Text, out id);

            if (ConnectionController.GetInstance().Tables.Where(x => x.Id.Equals(id) && x.TableStatus.Equals("Unavailable")).FirstOrDefault() != null)
            {
                MessageBox.Show("Please order available table !");
            }
            else
            {
                CustomerController.DoOrderTable(idText.Text);
                MessageBox.Show("Table Ordered !");
                OrderFoodDetailPage detailPage = new OrderFoodDetailPage();
                this.NavigationService.Navigate(detailPage);
            }
        }
Beispiel #26
0
        private void DoLoadTableData()
        {
            var employeeDetails = (from x in ConnectionController.GetInstance().Employees
                                   select new
            {
                Id = x.Id,
                EmployeeName = x.EmployeeFullname,
                EmployeeDepartment = x.Department.DepartmentName,
                EmployeeUsername = x.EmployeeUsername,
                EmployeePassword = x.EmployeePassword,
                EmployeeBanStatus = x.EmployeeBannedStatus,
                EmployeeEmail = x.EmployeeEmail,
                EmployeeGender = x.EmployeeGender,
                EmployeeSalary = x.EmployeeSalary
            }).ToList();

            employeeTable.ItemsSource = employeeDetails;
        }
        private void DoSendToConstructionDepartment(object sender, RoutedEventArgs e)
        {
            int id;

            Int32.TryParse(idText.Text, out id);

            if (ConnectionController.GetInstance().HeaderResponses.Where(x => x.ResponseStatus.Equals("Declined") && x.Id.Equals(id)).FirstOrDefault() != null)
            {
                MessageBox.Show("You can only sent Approved File!");
            }
            else
            {
                ResponseController.DoSendToConstructionDepartment(id);
                MessageBox.Show("File Sent to Construction Department!");
            }

            CreativeHomePage creativeHomePage = new CreativeHomePage();

            this.NavigationService.Navigate(creativeHomePage);
        }
Beispiel #28
0
        private void DoBuyMaterial(object sender, RoutedEventArgs e)
        {
            int id;

            Int32.TryParse(idText.Text, out id);

            if (ConnectionController.GetInstance().HeaderFundRequests.Where(x => x.Id.Equals(id) && x.ResponseStatus.Equals("Approved")).FirstOrDefault() != null)
            {
                PurchaseRequestController.DoBuyMaterial(id);
                MessageBox.Show("Material Bought");
            }
            else
            {
                MessageBox.Show("Sorry, you can only buy approved material");
            }

            PurchaseHomePage purchaseHomePage = new PurchaseHomePage();

            this.NavigationService.Navigate(purchaseHomePage);
        }
Beispiel #29
0
        private void DoScheduleTime(object sender, RoutedEventArgs e)
        {
            int id;

            Int32.TryParse(idText.Text, out id);

            if (ConnectionController.GetInstance().Rides.Where(x => x.Id.Equals(id) && x.RideMaintainStatus.Equals("Yes")).FirstOrDefault() != null)
            {
                MessageBox.Show("Can's Schedule, Ride is under Maintain");
            }
            else
            {
                MessageBox.Show("Ride Maintenance Scheduled !");
            }

            MaintenanceController.DoScheduleMaintainTime(startTime.Text, endTime.Text, id);
            MaintenanceHomePage maintenanceHomePage = new MaintenanceHomePage();

            this.NavigationService.Navigate(maintenanceHomePage);
        }
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();
            _loginManager = new LoginManager();
            _loginManager.LoginBehavior = LoginBehavior.Web;
#if MOCK
            _interactor = new InteractorAuth(new AuthController(ConnectionController.GetInstance(), WebMsgParser.ParseResponseAuth), new ValidationRA());
            ThemeHolder.Init(DataService.RepositoryController.RepositoryThemes);
            _presenter = new PresenterAuthMOCK(_authView, _interactor, new RouterAuth(this), FacebookCallLoginAction, null, null, null, new AuthStylesHolderIOS <GlobalControlsTheme>(new ThemeParser <GlobalControlsTheme>()), DataService.RepositoryController.RepositoryRA.LangRA);
#else
            _interactor = new InteractorAuth(new AuthController(ConnectionController.GetInstance(), WebMsgParser.ParseResponseAuth), new ValidationRA());
            ThemeHolder.Init(DataService.RepositoryController.RepositoryThemes);

            _presenter = new PresenterAuth(_authView, _interactor, new RouterAuth(this), FacebookCallLoginAction, null, null, null,
                                           new AuthStylesHolderIOS <GlobalControlsTheme>(new ThemeParser <GlobalControlsTheme>()), DataService.RepositoryController.RepositoryRA.LangRA);
#endif

            _presenter.SetConfig();

            _interactor.OnSocialLogOut += SocialLogout;
        }