예제 #1
0
        public void RunReportTest()
        {
            Current.Company_id = "1";
            Current.Acy_id     = "4";
            Current.Comp_code  = CCompany_exten.GetCode_id(Current.Company_id);

            new SetCustomised();
            Customised.TaxType = Core.SGST;


            List <PrintCopies> printdata = new List <PrintCopies>();

            PrintCopies _printdata = new PrintCopies();

            printdata.Add(_printdata);
            printdata[0].Copies = _printdata.FirstCopy;

            D_Creditnote.Build();
            D_CreditnoteItem.Build();

            FReportPreview frpt = new FReportPreview();

            frpt.reportViewer1.ShowPrintButton = true;
            P_Creditnote.Print(frpt.reportViewer1, ("7"), printdata);
            //P_CreditnoteItem.Print(frpt.reportViewer1, ("6"));
            frpt.Show();
            frpt.BringToFront();
        }
예제 #2
0
        void GetVersionInfo()
        {
            ////string InstalledVersion = Assembly.GetEntryAssembly().GetName().Version.ToString();

            ////string remoteversion = "";// RemoteVersion.Check();

            ////if (remoteversion == null)
            ////{
            ////    return;
            ////}

            ////if (remoteversion == InstalledVersion)
            ////{
            //lbl_version.Text = InstalledVersion;
            Current.Comp_code = CCompany_exten.GetCode_id(Current.Company_id);
            lbl_version.Text  = Current.Acy_Name + "" + Current.Comp_code;
            ////}
            ////else
            ////{
            ////    lbl_version.Text = " New Version " + remoteversion + " is found please update...";

            ////    spinner.Enabled = true;
            ////    spinner.Interval = 500;
            ////    spinner.Tick += new EventHandler(Timer_warning_Tick);
            ////}
        }
예제 #3
0
        void Scompany_menu_Click(object sender, EventArgs e)
        {
            List <Company> cmp = CCompany_exten.Active();

            if (cmp.Count != 0)
            {
                Defaultcompany defaultcompany = CDefaultcompany_exten.PKId("1", new DAL());

                if ((defaultcompany.Company_id == null) || (defaultcompany.Company_id == "NO"))
                {
                    if (scompany == null)
                    {
                        scompany = new SCompany();
                    }

                    //scompany. RaiseEvent_NeedToRefresh += SCompany_Refresh;
                    Controls.Add(scompany);
                    scompany.Show();
                    scompany.Dock = DockStyle.Fill;
                    scompany.BringToFront();
                }
                else
                {
                    Current.Company_id = defaultcompany.Company_id;

                    Current.Company_Name = CCompany_exten.GetName_Id(Current.Company_id);
                    Current.Comp_code    = CCompany_exten.GetCode_id(Current.Company_id);

                    Current.Acy_id   = defaultcompany.Acy_id;
                    Current.Acy_Name = CAcy_exten.GetName_Id(defaultcompany.Acy_id);
                    Current.Acy_From = CAcy_exten.AcyFrom_Id(defaultcompany.Acy_id);
                    Current.Acy_To   = CAcy_exten.AcyTo_Id(defaultcompany.Acy_id);


                    SCompany_Refresh(null, null);
                }
            }
        }
예제 #4
0
        public RunReportTest()
        {
            Current.Comp_code = CCompany_exten.GetCode_id(Current.Company_id);

            new SetCustomised();
            Customised.TaxType = "Test invoice";

            List <PrintCopies> printdata = new List <PrintCopies>();

            PrintCopies _printdata = new PrintCopies();

            printdata.Add(_printdata);
            printdata[0].Copies = _printdata.FirstCopy;

            D_Invoice.Build();
            D_InvoiceItem.Build();

            FReportPreview frpt = new FReportPreview();

            frpt.reportViewer1.ShowPrintButton = true;
            P_Invoice.Print(frpt.reportViewer1, ("6"), printdata);
            //P_InvoiceItem.Print(frpt.reportViewer1, ("6"));
            frpt.Show();
        }
예제 #5
0
        private void Print_copies()
        {
            ///
            List <PrintCopies> printdata = new List <PrintCopies>();

            ///
            if (check_original.Checked)
            {
                PrintCopies _printdata = new PrintCopies();
                printdata.Add(_printdata);
                printdata[0].Copies = _printdata.FirstCopy;
            }
            ///
            if ((check_duplicate.Checked) && (check_original.Checked))
            {
                PrintCopies _printdata = new PrintCopies();
                printdata.Add(_printdata);
                printdata[1].Copies = _printdata.SecondCopy;
            }
            else if ((check_duplicate.Checked) && (!check_original.Checked))
            {
                PrintCopies _printdata = new PrintCopies();
                printdata.Add(_printdata);
                printdata[0].Copies = _printdata.SecondCopy;
            }
            ///
            if ((check_triplicate.Checked) && (check_duplicate.Checked) && (check_original.Checked))
            {
                PrintCopies _printdata = new PrintCopies();
                printdata.Add(_printdata);
                printdata[2].Copies = _printdata.ThirdCopy;
            }
            else if ((check_triplicate.Checked) && (!check_duplicate.Checked) && (check_original.Checked))
            {
                PrintCopies _printdata = new PrintCopies();
                printdata.Add(_printdata);
                printdata[1].Copies = _printdata.ThirdCopy;
            }
            else if ((check_triplicate.Checked) && (!check_duplicate.Checked) && (!check_original.Checked))
            {
                PrintCopies _printdata = new PrintCopies();
                printdata.Add(_printdata);
                printdata[0].Copies = _printdata.ThirdCopy;
            }
            else if ((check_triplicate.Checked) && (check_duplicate.Checked) && (!check_original.Checked))
            {
                PrintCopies _printdata = new PrintCopies();
                printdata.Add(_printdata);
                printdata[1].Copies = _printdata.ThirdCopy;
            }

            Current.Comp_code = CCompany_exten.GetCode_id(Current.Company_id);

            new SetCustomised();

            Customised.TaxType = txt_taxtype_id.Text;
            D_Creditnote.Build();
            D_CreditnoteItem.Build();

            FReportPreview frpt = new FReportPreview();

            frpt.reportViewer1.ShowPrintButton = true;
            P_Creditnote.Print(frpt.reportViewer1, (vId), printdata);
            //P_CreditnoteItem.Print(frpt.reportViewer1, (vId));
            frpt.Show();
            print_panel.Hide();
            this.Hide();
        }