/// <summary>
        /// Muestra la ventada detalle
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        /// <history>
        /// [emoguel] created 23/03/2016
        /// </history>
        private void Cell_DoubleClick(object sender, RoutedEventArgs e)
        {
            FolioInvitationOuthouse          folioInvOut    = (FolioInvitationOuthouse)dgrFoliosInvOut.SelectedItem;
            frmFolioInvitationOuthouseDetail frmFolioDetail = new frmFolioInvitationOuthouseDetail();

            frmFolioDetail.oldFolioInvOut = folioInvOut;
            frmFolioDetail.Owner          = this;
            frmFolioDetail.enumMode       = ((_blnEdit)?EnumMode.Edit:EnumMode.ReadOnly);//Asignamos el modo
            if (frmFolioDetail.ShowDialog() == true)
            {
                int nIndex = 0;
                List <FolioInvitationOuthouse> lstFoliosInvOut = (List <FolioInvitationOuthouse>)dgrFoliosInvOut.ItemsSource;
                if (!ValidateFilter(frmFolioDetail.folioInvOut))                         //Verificamos si cumple con los filtros
                {
                    lstFoliosInvOut.Remove(folioInvOut);                                 //Quitamos el registro
                    StatusBarReg.Content = lstFoliosInvOut.Count + " Folio Invitatios."; //Actualizamos el registro
                }
                else
                {
                    ObjectHelper.CopyProperties(folioInvOut, frmFolioDetail.folioInvOut);//Asignamos los nuevos valores
                    lstFoliosInvOut             = lstFoliosInvOut.OrderBy(fi => fi.fiSerie).ThenBy(fi => fi.fiID).ToList();
                    dgrFoliosInvOut.ItemsSource = lstFoliosInvOut;
                    nIndex = lstFoliosInvOut.IndexOf(folioInvOut); //Buscamos el index del registro
                }
                dgrFoliosInvOut.Items.Refresh();                   //refrescamos el grid
                GridHelper.SelectRow(dgrFoliosInvOut, nIndex);     //Seleccionamos el registro
            }
        }
        /// <summary>
        /// Abre la ventana de detalle en modo add
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        /// <history>
        /// [emoguel] created 22/03/2016
        /// </history>
        private void btnAdd_Click(object sender, RoutedEventArgs e)
        {
            frmFolioInvitationOuthouseDetail frmFolioDetail = new frmFolioInvitationOuthouseDetail();

            frmFolioDetail.Owner    = this;
            frmFolioDetail.enumMode = EnumMode.Add;
            if (frmFolioDetail.ShowDialog() == true)
            {
                if (ValidateFilter(frmFolioDetail.folioInvOut))//Verficamos que cumpla con los filtros
                {
                    FolioInvitationOuthouse        folioInvOut     = frmFolioDetail.folioInvOut;
                    List <FolioInvitationOuthouse> lstFoliosInvOut = (List <FolioInvitationOuthouse>)dgrFoliosInvOut.ItemsSource;
                    lstFoliosInvOut.Add(folioInvOut);                                                                       //Agregamos el registro a la lista
                    lstFoliosInvOut             = lstFoliosInvOut.OrderBy(fi => fi.fiSerie).ThenBy(fi => fi.fiID).ToList(); //Reordenamos la lista
                    dgrFoliosInvOut.ItemsSource = lstFoliosInvOut;
                    dgrFoliosInvOut.Items.Refresh();                                                                        //Recargamos el grid
                    int nIndex = lstFoliosInvOut.IndexOf(folioInvOut);                                                      //obtenemos el index del nuevo registro
                    GridHelper.SelectRow(dgrFoliosInvOut, nIndex);                                                          //Seleccionamos el nuevo registro
                    StatusBarReg.Content = lstFoliosInvOut.Count + " Folio Invitations.";                                   //Actualizamos el contador
                }
            }
        }