Esempio n. 1
0
        /// <summary>
        /// Carga e incializa las variables
        /// </summary>
        /// <history>
        /// [jorcanche] 02/02/2016 Created
        /// [erosado] 19/05/2016  Modified. Se agregó asincronía
        /// </history>
        private async void Window_Loaded(object sender, RoutedEventArgs e)
        {
            //Indicamos al statusbar que me muestre cierta informacion cuando oprimimos cierto teclado
            KeyboardHelper.CkeckKeysPress(StatusBarCap, Key.Capital);
            KeyboardHelper.CkeckKeysPress(StatusBarIns, Key.Insert);
            KeyboardHelper.CkeckKeysPress(StatusBarNum, Key.NumLock);
            //Cargamos los datos del huesped
            _guest = await BRGuests.GetGuest(_guestId);

            EnabledControls(true, true, false);
            //Cargamos los PR
            cbopnPR.ItemsSource = await BRPersonnel.GetPersonnel(Context.User.Location.loID, "ALL", "PR");

            // desplegamos los datos del huesped
            txtguID.Text         = _guest.guID.ToString();
            txtguLastName1.Text  = _guest.guLastName1;
            txtguFirstName1.Text = _guest.guFirstName1;
            txtguCheckInD.Text   = _guest.guCheckInD.ToString("dd/MM/yyyy");
            txtguCheckOutD.Text  = _guest.guCheckOutD.ToString("dd/MM/yyyy");

            //Cargamos el datagrid
            _pRNoteViewSource        = (CollectionViewSource)FindResource("pRNoteViewSource");
            _pRNoteViewSource.Source = await BRNotes.GetNoteGuest(_guestId);

            //Si no tiene ninguna nota se inhabilita el control
            if (dgNotes.Items.Count < 1)
            {
                btnShowInfo.IsEnabled = false;
            }
        }
Esempio n. 2
0
        /// <summary>
        ///   Valida las teclas INS|MAYSU|LOCKNUM & Escape
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        /// <history>
        ///   [vku] 09/Jul/2016 Created
        /// </history>
        private void Window_KeyDown(object sender, KeyEventArgs e)
        {
            switch (e.Key)
            {
            case Key.Capital:
            {
                KeyboardHelper.CkeckKeysPress(StatusBarCap, Key.Capital);
                break;
            }

            case Key.Insert:
            {
                KeyboardHelper.CkeckKeysPress(StatusBarIns, Key.Insert);
                break;
            }

            case Key.NumLock:
            {
                KeyboardHelper.CkeckKeysPress(StatusBarNum, Key.NumLock);
                break;
            }

            case Key.Escape:
                btnCancel_Click(null, null);
                break;
            }
        }
Esempio n. 3
0
 /// <summary>
 /// Configura el formulario
 /// </summary>
 /// <history>
 /// [aalcocer] 24/02/2016 Created
 /// </history>
 private void frmMailOuts_Loaded(object sender, RoutedEventArgs e)
 {
     KeyboardHelper.CkeckKeysPress(StatusBarCap, Key.Capital);
     KeyboardHelper.CkeckKeysPress(StatusBarIns, Key.Insert);
     KeyboardHelper.CkeckKeysPress(StatusBarNum, Key.NumLock);
     txtUser.Text                 = Context.User.User.peN;
     txtLocation.Text             = Context.User.LeadSource.lsN;
     _objGuestsMailOutsViewSource = ((CollectionViewSource)(this.FindResource("objGuestsMailOutsViewSource")));
     _languageViewSource          = ((CollectionViewSource)(this.FindResource("languageViewSource")));
     _mailOutTextViewSource       = ((CollectionViewSource)(this.FindResource("mailOutTextViewSource")));
 }
Esempio n. 4
0
 private void Window_Loaded(object sender, RoutedEventArgs e)
 {
     StaStart("Load Form...");
     LoadGrids();
     SetupParameters();
     lblUserName.Content = Context.User.User.peN;
     _frmReportQueue     = new frmReportQueue(Context.User.HasPermission(EnumPermission.RptExcel, EnumPermisionLevel.ReadOnly));
     KeyboardHelper.CkeckKeysPress(statusBarCap, Key.Capital);
     KeyboardHelper.CkeckKeysPress(statusBarIns, Key.Insert);
     KeyboardHelper.CkeckKeysPress(statusBarNum, Key.NumLock);
     StaEnd();
 }
 /// <summary>
 /// Verifica cuando se presiona las teclas Bloq
 /// </summary>
 /// <history>
 /// [vipacheco] 17/Agosto/2016 Created
 /// </history>
 private void Window_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.Key == Key.Capital)
     {
         KeyboardHelper.CkeckKeysPress(StatusBarCap, Key.Capital);
     }
     else if (e.Key == Key.Insert)
     {
         KeyboardHelper.CkeckKeysPress(StatusBarIns, Key.Insert);
     }
     else if (e.Key == Key.NumLock)
     {
         KeyboardHelper.CkeckKeysPress(StatusBarNum, Key.NumLock);
     }
 }
Esempio n. 6
0
        /// <summary>
        /// Verifica si los botones estan activos
        /// </summary>
        /// <history>
        /// [edgrodriguez] 22/Jun/2016 Created
        /// </history>
        private void Window_KeyDown(object sender, KeyEventArgs e)
        {
            switch (e.Key)
            {
            case Key.Capital:
                KeyboardHelper.CkeckKeysPress(StatusBarCap, Key.Capital);
                break;

            case Key.Insert:
                KeyboardHelper.CkeckKeysPress(StatusBarIns, Key.Insert);
                break;

            case Key.NumLock:
                KeyboardHelper.CkeckKeysPress(StatusBarNum, Key.NumLock);
                break;
            }
        }
Esempio n. 7
0
 /// <summary>
 /// Inicio y configuracion del formulario.
 /// </summary>
 /// <history>
 /// [edgrodriguez] 18/Feb/2016 Created
 /// </history>
 private void frmInventoryMovements_Loaded(object sender, RoutedEventArgs e)
 {
     _salesRoom = BRSalesRooms.GetSalesRoom(Context.User.Warehouse.whID);
     KeyboardHelper.CkeckKeysPress(StatusBarCap, Key.Capital);
     KeyboardHelper.CkeckKeysPress(StatusBarIns, Key.Insert);
     KeyboardHelper.CkeckKeysPress(StatusBarNum, Key.NumLock);
     lblUserName.Content  = Context.User.User.peN;
     lblWareHouse.Content = Context.User.Warehouse.whN;
     lblCloseDate.Content = "Close Receipts Date: " + _salesRoom.srGiftsRcptCloseD.ToString("dd/MMM/yyyy");
     InitializeGrdNew();
     _dtmServerdate = BRHelpers.GetServerDate();
     dtpDate_SelectedDateChanged(null, null);
     GridHelper.SetUpGrid(grdNew, new WarehouseMovement());
     if (((EnumPermisionLevel)Context.User.Permissions.FirstOrDefault(c => c.pppm == "GIFTSRCPTS")?.pppl) >=
         EnumPermisionLevel.Special)
     {
         fraDate.IsEnabled = true;
     }
 }
Esempio n. 8
0
        /// <summary>
        /// Carga e incializa la variables cuando es invocado el metodo
        /// </summary>
        /// <history>
        /// [jorcanche] created 05/05/2016
        /// </history>
        private void LoadOuthouse()
        {
            StaStart("Loading OutHouse...");

            //Cargamos las variables del usuario
            txtUser.Text     = Context.User.User.peN;
            txtLocation.Text = Context.User.Location.loN;

            //Cargamos la fecha actual del servidor
            dtpDate.Value = BRHelpers.GetServerDate();
            dtpDate_ValueChanged(null, null);

            //Inicializamos la variable del datagrid
            _outPremanifestViewSource = (CollectionViewSource)FindResource("outPremanifestViewSource");

            //Indicamos al statusbar que me muestre cierta informacion cuando oprimimos cierto teclado
            KeyboardHelper.CkeckKeysPress(StatusBarCap, Key.Capital);
            KeyboardHelper.CkeckKeysPress(StatusBarIns, Key.Insert);
            KeyboardHelper.CkeckKeysPress(StatusBarNum, Key.NumLock);

            //Cargamos el DataGrid
            LoadGrid();
        }
 /// <summary>
 /// Verifica que teclas están presionadas
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 /// <history>
 /// [emoguel] created 30/04/2016
 /// </history>
 private void Window_IsKeyboardFocusedChanged(object sender, DependencyPropertyChangedEventArgs e)
 {
     KeyboardHelper.CkeckKeysPress(StatusBarCap, Key.Capital);
     KeyboardHelper.CkeckKeysPress(StatusBarIns, Key.Insert);
     KeyboardHelper.CkeckKeysPress(StatusBarNum, Key.NumLock);
 }
Esempio n. 10
0
        /// <summary>
        /// Carga los datos iniciales del formulario
        /// </summary>
        /// <history>
        /// [ecanul] 04/04/2016 Created;
        /// [ecanul] 09/09/2016 Modified. Ahora no carga el listado al iniciar el formulario
        /// </history>
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            KeyboardHelper.CkeckKeysPress(StatusBarCap, Key.Capital);
            KeyboardHelper.CkeckKeysPress(StatusBarIns, Key.Insert);
            KeyboardHelper.CkeckKeysPress(StatusBarNum, Key.NumLock);

            #region Validacion de campos
            UIHelper.SetUpControls(new GuestsGroup(), grdGroupInfo, blnCharacters: true);
            UIHelper.SetUpControls(new Guest(), grdGuestInfo, blnCharacters: true);
            grdGroupInfo.DataContext = _guestsGroup;
            grdGuestInfo.DataContext = _guest;
            #endregion
            var loadList = (_enumAction == EnumAction.None);
            if (_enumAction == EnumAction.None)
            {
                txtgxID.Text = _groupID.ToString();
            }
            switch (_enumAction)
            {
            case EnumAction.Add: //Crea un nuevo grupo
                EnableControls(1);
                _mode = false;
                break;

            case EnumAction.None: //Midifica un grupo existente
                EnableControls(3);
                break;

            default: //Habilita los controles de busqueda y botones sin guardado
                EnableControls(0);
                break;
            }

            //Muestra u oculta los botones Add y Edit
            if (_enumAction == EnumAction.Search)
            {
                btnAdd.Visibility = Visibility.Visible;
            }
            else
            {
                btnAdd.Visibility = Visibility.Hidden;
            }
            if (_enumAction != EnumAction.Add)
            {
                btnEdit.Visibility = Visibility.Visible;
            }
            else
            {
                btnEdit.Visibility = Visibility.Hidden;
            }
            //Fecha Inicial
            _guest.guCheckInD = _date.AddDays(-7);
            //Fecha Final
            _guest.guCheckOutD = _date;
            //se impide modificar datos si esta en modo solo lectura
            if (App.Current.Properties.IsReadOnly)
            {
                btnAdd.IsEnabled    = false;
                btnEdit.IsEnabled   = false;
                btnDelete.IsEnabled = false;
            }
            if (loadList)
            {
                CaseLoad();
            }
            txtgxID.Text = "";
        }
Esempio n. 11
0
 /// <summary>
 /// Configura el formulario
 /// </summary>
 /// <history>
 /// [aalcocer] 05/03/2016 Created
 /// </history>
 private void frmGraph_Loaded(object sender, RoutedEventArgs e)
 {
     KeyboardHelper.CkeckKeysPress(StatusBarCap, Key.Capital);
     KeyboardHelper.CkeckKeysPress(StatusBarIns, Key.Insert);
     KeyboardHelper.CkeckKeysPress(StatusBarNum, Key.NumLock);
 }