Пример #1
0
        private void btnPrint_Click(object sender, EventArgs e)
        {
            string          idbill = Convert.ToString(cmb.SelectedValue);
            XtraReport1     rpt    = new XtraReport1(idbill);
            ReportPrintTool tool   = new ReportPrintTool(rpt);

            rpt.ShowPreviewDialog();
        }
Пример #2
0
        void OnNavBarItemsClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            if (sender != navBarItemExit)
            {
                RemoveControls();
            }

            if (sender == navBarItemCheck)
            {
                //Process prupdate = Process.Start("wyUpdate.exe");
                CheckUpdate();
            }
            //else if (sender == navBarItemHelp)
            //{
            //    //Help.ShowHelp(this, "C:\\Users\\Femmy\\Documents\\Visual Studio 2010\\Projects\\TSS_Oyo\\BankReconciliation\\reconciliation.chm");

            //}
            else if (sender == navBarItemMergeAgent)
            {
                tableLayoutPanel2.Controls.Add((new Form1().panelContainer), 1, 0);

                Form1.publicStreetGroup.Tag = ((sender) as NavBarItem).Tag;

                Form1.publicStreetGroup.RefreshForm();
            }
            else if (sender == navBarItemMergeApproval)
            {
                tableLayoutPanel2.Controls.Add((new FrmApproval().panelContainer), 1, 0);

                FrmApproval.publicStreetGroup.Tag = ((sender) as NavBarItem).Tag;

                FrmApproval.publicStreetGroup.RefreshForm();
            }
            else if (sender == navBItmTaxAgent)
            {
                string strquery = string.Format("SELECT UTINNew ,tblTaxAgent.OrganizationName ,Registration.tblTaxAgentMerge.UTIN ,Registration.tblTaxAgentMerge.OrganizationName FROM Registration.tblTaxAgentMerge JOIN Registration.tblTaxAgent ON UTINNew = tblTaxAgent.UTIN AND TaxAgentReferenceNumberNew = Registration.tblTaxAgent.TaxAgentReferenceNumber");

                using (var ds = new System.Data.DataSet())
                {
                    using (SqlDataAdapter ada = new SqlDataAdapter(strquery, Logic.ConnectionString))
                    {
                        ada.SelectCommand.CommandTimeout = 0;
                        ada.Fill(ds, "tables");
                    }

                    if (ds.Tables[0] != null && ds.Tables[0].Rows.Count >= 1)
                    {
                        var listret = (from DataRow row in ds.Tables[0].Rows
                                       select new ReportsMergi
                        {
                            OrganizationNameNew = row["OrganizationName"] as string,
                            UTINNew = row["UTINNew"] as string,
                            UTIN = row["UTIN"] as string,
                            OrganizationName = row["OrganizationName"] as string
                        }).ToList();

                        //XtraRepTaxAgentReturnAnnual Annual = new XtraRepTaxAgentReturnAnnual { DataSource = listret, logoPath = Logic.logopth };
                        //Annual.xrLabel11.Text = string.Format("{0} STATE GOVERNMENT", Program.StateName.ToUpper());
                        //Annual.xrLabel12.Text = string.Format("Tax Agent Annual returns report for {0} assessmenyt year", oDataRowViewsd.Row["TaxYear"]);
                        //Annual.ShowPreviewDialog();
                        XtraReport1 report = new XtraReport1 {
                            DataSource = listret
                        };
                        report.ShowPreviewDialog();
                    }
                    else
                    {
                        Common.setMessageBox("No Record Found for selected  Tax Agent Reconcilied", Program.ApplicationName, 1);
                        return;
                    }
                }
            }
            else if (sender == navBarItemExit)
            {
                Close();
            }
            //else if (sender == navBarItemDataUpload)
            //{
            //    tableLayoutPanel2.Controls.Add((new FrmTransaction().panelContainer), 1, 0);

            //    FrmTransaction.publicStreetGroup.Tag = ((sender) as NavBarItem).Tag;

            //    FrmTransaction.publicStreetGroup.RefreshForm();

            //}
        }