Ejemplo n.º 1
0
        private void onPrintMultiGiftCardEvent(object param)
        {
            List <Int32> _lstId        = new List <Int32>();
            bool         detechChecked = false;
            var          i             = 0;

            while (i < GiftCard.Count)
            {
                if (GiftCard[i].IsChecked == true)
                {
                    detechChecked = true;
                    _lstId.Add(GiftCard[i].GiftCardID);
                }
                i++;
            }
            if (!detechChecked)
            {
                ModernDialog md = new ModernDialog();
                md.CloseButton.FindResource("close").ToString();
                md.Content = App.Current.FindResource("select_least_one_print").ToString();
                md.Title   = App.Current.FindResource("notification").ToString();
                md.ShowDialog();
            }
            else
            {
                /*System.Windows.Forms.WebBrowser webBrowserPreview = new System.Windows.Forms.WebBrowser();
                 * webBrowserPreview.DocumentText = MultiCreateHTML(_lstId);
                 * webBrowserPreview.DocumentCompleted += webBrowser_ShowPrintPreviewDialog_DocumentCompleted;*/
                Views.Setting.GiftCard_PreviewPrint prevPrint = new Views.Setting.GiftCard_PreviewPrint(_lstId);
                prevPrint.ShowDialog();
            }
        }
Ejemplo n.º 2
0
        private void onPrintGiftCardEvent(string param)
        {
            if (string.IsNullOrEmpty(param) || Convert.ToInt32(param) == 0)
            {
                return;
            }
            List <Int32> lstId_ = new List <Int32>();

            lstId_.Add(Convert.ToInt32(param));

            /*System.Windows.Forms.WebBrowser webBrowserPreview = new System.Windows.Forms.WebBrowser();
             * webBrowserPreview.DocumentText = MultiCreateHTML(lstId_);
             * webBrowserPreview.DocumentCompleted += webBrowser_ShowPrintPreviewDialog_DocumentCompleted;*/
            Views.Setting.GiftCard_PreviewPrint prevPrint = new Views.Setting.GiftCard_PreviewPrint(lstId_);
            prevPrint.ShowDialog();
        }