Beispiel #1
0
        public void PrintPreview()
        {
            frmZgjidhPrintiminFitimi frm = new frmZgjidhPrintiminFitimi();

            frm.ShowDialog();
            if ((frm.zgjedhja == 1) && (gridaFitimi.RowCount != 0))
            {
                Doc.GridEX         = gridaFitimi;
                Doc.PageHeaderLeft = MDIAdminTjeter.emriRes + Environment.NewLine +
                                     "Fitimi i përmbledhur midis datave " + dateFillimi.Value.ToString("dd.MM.yyyy") + " dhe " +
                                     dateMbarimi.Value.ToString("dd.MM.yyyy");
                frmRaportJanus frmPrint = new frmRaportJanus();
                frmPrint.PrintPreviewControl1.Document = Doc;
                frmPrint.ShowDialog();
            }
            else if ((frm.zgjedhja == 2) && (gridaFaturat.RowCount != 0))
            {
                Doc.GridEX         = gridaFaturat;
                Doc.PageHeaderLeft = MDIAdminTjeter.emriRes + Environment.NewLine +
                                     "Fitimi i detajuar për datën " + gridaFitimi.GetRow(gridaFitimi.Row).Cells["DATAFITIMI"].Text;
                frmRaportJanus frmPrint = new frmRaportJanus();
                frmPrint.PrintPreviewControl1.Document = Doc;
                frmPrint.ShowDialog();
            }
        }
 public void PrintPreview()
 {
     if (this.grida.RowCount != 0)
     {
         frmRaportJanus frmPrint = new frmRaportJanus();
         frmPrint.PrintPreviewControl1.Document = Doc;
         frmPrint.ShowDialog();
     }
 }
 public void PrintPreview()
 {
     try
     {
         if (this.gridArtikujt.RowCount != 0)
         {
             frmRaportJanus frmPrint = new frmRaportJanus();
             frmPrint.PrintPreviewControl1.Document = Doc;
             frmPrint.ShowDialog();
         }
     }
     catch (Exception ex)
     {
         return;
     }
 }
Beispiel #4
0
        public void PrintPreview()
        {
            frmZgjidhPrintiminXhiro frm = new frmZgjidhPrintiminXhiro();

            frm.ShowDialog();
            if ((frm.zgjedhja == 1) && (gridDatat.RowCount != 0))
            {
                Doc.GridEX         = gridDatat;
                Doc.PageHeaderLeft = MDIAdminTjeter.emriRes + Environment.NewLine +
                                     "Xhiro e përmbledhur midis datave " + this.dtpFillimi.Value.ToString("dd.MM.yyyy") + " dhe " +
                                     dtpMbarimi.Value.ToString("dd.MM.yyyy");
                if (chkKamarieri.Checked)
                {
                    Doc.PageHeaderLeft += ", për kamarierin " + cboKamarieri.Text;
                }
                if (chkTavolina.Checked)
                {
                    Doc.PageHeaderLeft += ", për tavolinën " + cboTavolina.Text;
                }
                frmRaportJanus frmPrint = new frmRaportJanus();
                frmPrint.PrintPreviewControl1.Document = Doc;
                frmPrint.ShowDialog();
            }
            else if ((frm.zgjedhja == 2) && (gridDetaje.RowCount != 0))
            {
                Doc.GridEX         = gridDetaje;
                Doc.PageHeaderLeft = MDIAdminTjeter.emriRes + Environment.NewLine +
                                     "Xhiro e detajuar për datën " + gridDatat.GetRow(gridDatat.Row).Cells["DATA_STR"].Text;
                if (chkKamarieri.Checked)
                {
                    Doc.PageHeaderLeft += ", për kamarierin " + cboKamarieri.Text;
                }
                if (chkTavolina.Checked)
                {
                    Doc.PageHeaderLeft += ", për tavolinën " + cboTavolina.Text;
                }
                frmRaportJanus frmPrint = new frmRaportJanus();
                frmPrint.PrintPreviewControl1.Document = Doc;
                frmPrint.ShowDialog();
            }
        }