/// <summary>
 /// Initializes a new instance of the <see cref="MissingBarcodePage"/> class.
 /// </summary>
 /// <param name="barCodeLoading">The bar code loading.</param>
 /// <param name="fileInfo">The file information.</param>
 public MissingBarcodePage(NewLoadingModel barCodeLoading, FileInfoModel fileInfo)
 {
     InitializeComponent();
     _loading       = barCodeLoading;
     _fileInfo      = fileInfo;
     BindingContext = new MissingBarcodeViewModel(new PageService(), _loading, _fileInfo);
 }
示例#2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="LoadMenu"/> class.
 /// </summary>
 /// <param name="barCodeLoading">The bar code loading.</param>
 /// <param name="fileInfo">The file information.</param>
 public LoadMenu(NewLoadingModel barCodeLoading, FileInfoModel fileInfo)
 {
     InitializeComponent();
     _loading       = barCodeLoading;
     _fileinfo      = fileInfo;
     BindingContext = new LoadMenuViewModel(new PageService(), barCodeLoading, fileInfo);
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="LoadEndControl"/> class.
 /// </summary>
 /// <param name="loading">The loading.</param>
 /// <param name="fileInfo">The file information.</param>
 public LoadEndControl(NewLoadingModel loading, FileInfoModel fileInfo)
 {
     InitializeComponent();
     _loading       = loading;
     _fileInfo      = fileInfo;
     BindingContext = new LoadEndControlViewModel(new PageService(), loading, fileInfo);
 }
示例#4
0
        /// <summary>
        /// Adjusts the stack layouts.
        /// </summary>
        /// <param name="loading">The loading.</param>
        public void AdjustStackLayouts(NewLoadingModel loading)
        {
            if (string.IsNullOrEmpty(loading.FileItemModel.Barecode) && string.IsNullOrEmpty(loading.SelectedBarcode))
            {
                //hide digit stacklayout and increase height of scanner stackloayout,hide pbo pbm button
                BarcodeDigitStackLayout.IsVisible       = false;
                BarcodeScannerStackLayout.HeightRequest = 250;
                StackButton.IsVisible = false;
            }
            else
            {
                //show digit stacklayout and decrease height of scanner stack ,show pbo pbm button
                BarcodeDigitStackLayout.IsVisible = true;
                string ThreeDigitBarcode = "";

                if (!string.IsNullOrEmpty(loading.SelectedBarcode))
                {
                    ThreeDigitBarcode = loading.SelectedBarcode.Substring(loading.SelectedBarcode.Length - 3, 3);
                }

                if (!string.IsNullOrEmpty(loading.FileItemModel.Barecode))
                {
                    ThreeDigitBarcode = loading.FileItemModel.Barecode.Substring(loading.FileItemModel.Barecode.Length - 3, 3);
                }

                BarcodeText.Text = ThreeDigitBarcode;
                BarcodeText.HorizontalTextAlignment     = TextAlignment.Center;
                BarcodeScannerStackLayout.HeightRequest = 75;
                StackButton.IsVisible = true;
            }
        }
示例#5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="PackingCygestType"/> class.
 /// </summary>
 /// <param name="loading">The loading.</param>
 /// <param name="fileInfo">The file information.</param>
 public PackingCygestType(NewLoadingModel loading, FileInfoModel fileInfo)
 {
     InitializeComponent();
     _loading = loading;
     AdjustStackLayouts(loading);
     BindingContext = PackingCygestTypeViewModel = new PackingCygestTypeViewModel(new PageService(), loading, fileInfo);
     InitializeLaser();
 }
示例#6
0
 public MissingBarcodeViewModel(IPageService pageService, NewLoadingModel barCodeLoading, FileInfoModel fileInfo)
 {
     HandleTranslation(_appViewModel.DefaultedCultureInfo);
     _barCodeLoading = barCodeLoading;
     _fileInfo       = fileInfo;
     _pageService    = pageService;
     PopulatedMissingBarcodeList();
     Back = new Command(GoBack);
 }
 /// <summary>
 /// Populates the buttons.
 /// </summary>
 /// <param name="loading">The loading.</param>
 private void PopulateButtons(NewLoadingModel loading)
 {
     if (loading.RoomsFiles != null)
     {
         PopulateRoomFileButton();
     }
     else
     {
         PopulateRoomButton();
     }
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="LoadEndControlViewModel"/> class.
 /// </summary>
 /// <param name="pageService">The page service.</param>
 /// <param name="loading">The loading.</param>
 /// <param name="fileInfo">The file information.</param>
 public LoadEndControlViewModel(IPageService pageService, NewLoadingModel loading, FileInfoModel fileInfo)
 {
     _languageSelected = _appViewModel.DefaultedCultureInfo;
     HandleTranslation(_appViewModel.DefaultedCultureInfo);
     _db         = new DatabaseAccess();
     PageService = pageService;
     NewLoading  = loading;
     _fileInfo   = fileInfo;
     GetEndControl(NewLoading);
     GoToSignatureTxt = "Next";
     GoToSignature    = new Command(GoToSignatureScreenAsync);
     _db.EmptyDatabaseForLoadSynchro();
 }
        /// <summary>
        /// Updates the loading photo table.
        /// </summary>
        /// <param name="imagePath">The image path.</param>
        /// <param name="newLoading">The new loading.</param>
        private async Task UpdateLoadingPhotoTable(string imagePath, NewLoadingModel newLoading)
        {
            ItemPhotoModel photoModel = new ItemPhotoModel();

            //tring imageBase64 = DependencyService.Get<IFileMgr>().GetBase64ImageString(imagePath);

            photoModel.Barecode  = newLoading.FileItemModel.Barecode;
            photoModel.Comments  = newLoading.FileItemModel.Comments_loading;
            photoModel.Photo     = newLoading.FileItemModel.PhotoPath;
            photoModel.OSDS      = Constants.Loading;
            photoModel.Telephone = newLoading.FileItemModel.Telephone_loading;

            await _dbAccess.InsertLoadingPhoto(photoModel);
        }
 /// <summary>
 /// Determines whether [has re assembling property] [the specified loading].
 /// </summary>
 /// <param name="loading">The loading.</param>
 private bool  HasReAssemblingProperty(NewLoadingModel loading)
 {
     if (loading.FileItemModel != null &&
         loading.FileItemModel.Mounting_dismounting != null &&
         loading.FileItemModel.Mounting_dismounting.Equals("True"))
     {
         VisibilityReassembling = true;
     }
     else
     {
         VisibilityReassembling = false;
     }
     return(VisibilityReassembling);
 }
 private bool HasMechanicalState(NewLoadingModel loading)
 {
     VisibilityMechanicalState = false;
     if (loading.FileItemModel != null &&
         loading.FileItemModel.Item_MS != null &&
         loading.FileItemModel.Item_MS.Equals("True"))
     {
         VisibilityMechanicalState = true;
     }
     else
     {
         VisibilityMechanicalState = false;
     }
     return(VisibilityMechanicalState);
 }
示例#12
0
 /// <summary>
 /// Initializes a new instance of the <see cref="LoadSynchroViewModel"/> class.
 /// </summary>
 /// <param name="pageService">The page service.</param>
 /// <param name="loading">The loading.</param>
 /// <param name="fileInfo">The file information.</param>
 public LoadSynchroViewModel(IPageService pageService, NewLoadingModel loading, FileInfoModel fileInfo)
 {
     HandleTranslation(_appViewModel.DefaultedCultureInfo);
     PageService = pageService;
     _loading    = loading;
     _fileInfo   = fileInfo;
     _db         = new DatabaseAccess();
     _dbAsync    = new DatabaseAccessAsync();
     PerfomCall();
     _db.EmptyDatabaseForLoadSynchro();
     FinshSynchro     = new Command(GoToControls);
     LoadingText      = LoadingTextWait;
     LoadingIndicator = true;
     SyncComplete     = false;
 }
示例#13
0
 /// <summary>
 /// Initializes a new instance of the <see cref="RoomSelection"/> class.
 /// </summary>
 /// <param name="loading">The loading.</param>
 /// <param name="fileInfo">The file information.</param>
 public RoomSelection(NewLoadingModel loading, FileInfoModel fileInfo)
 {
     try
     {
         _languageSelected = _appViewModel.DefaultedCultureInfo;
         BindingContext    = new RoomSelectionViewModel(new PageService(), loading, fileInfo, _languageSelected);
         _loading          = loading;
         _fileInfo         = fileInfo;
         InitializeComponent();
         Task.Delay(TimeSpan.FromSeconds(10));
         PopulateButtons(loading);
     }
     catch (Exception e)
     {
         throw e;
     }
 }
示例#14
0
 /// <summary>
 /// Initializes a new instance of the <see cref="PhotoAndCommentPage"/> class.
 /// </summary>
 /// <param name="loading">The loading.</param>
 /// <param name="appear">if set to <c>true</c> [appear].</param>
 /// <param name="fileInfo">The file information.</param>
 public PhotoAndCommentPage(NewLoadingModel loading, bool appear, FileInfoModel fileInfo)
 {
     InitializeComponent();
     _loading  = loading;
     _fileInfo = fileInfo;
     CallLabel(appear, true);
     Appear         = appear;
     BindingContext = new PhotoAndCommentViewModel(new PageService(), _loading, _fileInfo, "loading");
     if (!string.IsNullOrEmpty(_loading.FileItemModel.Comments_loading))
     {
         MyEditor.Text = _loading.FileItemModel.Comments_loading;
     }
     else
     {
         MyEditor.Text = "";
     }
 }
        /// <summary>
        /// Gets the end control.
        /// </summary>
        /// <param name="newLoading">The new loading.</param>
        private void GetEndControl(NewLoadingModel newLoading)
        {
            if (newLoading != null && newLoading.FileItemModel != null && newLoading.FileItemModel.File_Number != null)
            {
                List <EndControlsLoadingModel> endControl;

                endControl = _db.GetEndControlLoading(newLoading.FileItemModel.File_Number);
                foreach (var controlIten in endControl)
                {
                    NumberOfItem   = controlIten.Qt_items.ToString();
                    MissingBarcode = controlIten.Qt_manque.ToString();
                    DoubleBarcode  = controlIten.Qt_double.ToString();
                }

                //Populate Listview of Controls information
                ControlItem = new ObservableCollection <LoadingEndControlModel>();

                LoadingEndControlModel numOfItem = new LoadingEndControlModel()
                {
                    Index            = 0,
                    ControlName      = LblNumberOfItem,
                    ControlItemCount = NumberOfItem
                };
                ControlItem.Add(numOfItem);

                LoadingEndControlModel missingBarcode = new LoadingEndControlModel()
                {
                    Index            = 1,
                    ControlName      = LblMissingBarcode,
                    ControlItemCount = MissingBarcode
                };
                ControlItem.Add(missingBarcode);


                LoadingEndControlModel doubleBarcode = new LoadingEndControlModel()
                {
                    Index            = 2,
                    ControlName      = LblDoubleBarcode,
                    ControlItemCount = DoubleBarcode
                };
                ControlItem.Add(doubleBarcode);

                GetLoadingSummary(newLoading.FileItemModel.File_Number);
            }
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="PhotoAndCommentViewModel"/> class.
        /// </summary>
        /// <param name="pageService">The page service.</param>
        /// <param name="loading">The loading.</param>
        /// <param name="fileInfo">The file information.</param>
        /// <param name="status">The status.</param>
        public PhotoAndCommentViewModel(IPageService pageService, NewLoadingModel loading, FileInfoModel fileInfo, string status)
        {
            PageService = pageService;

            HandleTranslation(_appViewModel.DefaultedCultureInfo);
            _db              = new DatabaseAccess();
            _loading         = loading;
            _fileInfoLoading = fileInfo;
            _status          = status;
            _photoPathList   = new List <string>();
            DetermineValues();
            GetPhotoPathFromDb(_status, _loading.FileItemModel.Barecode);
            GetPhotoQualityFromDb();
            AddPhoto           = new Command(TakePhoto);
            SaveLoadingDetails = new Command(CallSaveLoadingAsync);
            SaveAndGoBack      = new Command(SaveImageAndGoBack);
            CrossMedia.Current.Initialize();
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="LoadingOptionViewModel"/> class.
        /// </summary>
        /// <param name="pageService">The page service.</param>
        /// <param name="loading">The loading.</param>
        /// <param name="fileInfo">The file information.</param>
        public LoadingOptionViewModel(IPageService pageService, NewLoadingModel loading, FileInfoModel fileInfo)
        {
            HandleTranslation(_appViewModel.DefaultedCultureInfo);
            PageService     = pageService;
            _loading        = loading;
            LblSelectedItem = _loading.FileItemModel.Barecode;
            _fileinfo       = fileInfo;
            Back            = new Command(GoBack);
            _db             = new DatabaseAccess();
            SetSelectedOption();
            NextCommand = new Command(GetValues);
            HasMechanicalState(loading);
            HasDismountingProperty(loading);
            HasReAssemblingProperty(loading);

            /*
             *
             * if( !VisibilityReassembling && ! VisibilityMechanicalState && ! VisibilityDismounting  )
             * {
             *
             *    GetValues();
             * }*/
        }
示例#18
0
 /// <summary>
 /// Initializes a new instance of the <see cref="LoadingOption"/> class.
 /// </summary>
 /// <param name="loading">The loading.</param>
 /// <param name="fileInfo">The file information.</param>
 public LoadingOption(NewLoadingModel loading, FileInfoModel fileInfo)
 {
     InitializeComponent();
     BindingContext = new LoadingOptionViewModel(new PageService(), loading, fileInfo);
 }
示例#19
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Synchro"/> class.
 /// </summary>
 /// <param name="newLoading">The new loading.</param>
 /// <param name="fileInformation">The file information.</param>
 public Synchro(NewLoadingModel newLoading, FileInfoModel fileInformation)
 {
     InitializeComponent();
     BindingContext = new LoadSynchroViewModel(new PageService(), newLoading, fileInformation);
 }