Ejemplo n.º 1
0
        private void frm_billprint_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Escape)
            {
                this.Close();
                this.Dispose();
            }
            else if (e.Control && e.KeyCode == Keys.P)
            {
                frm_printcopy frm = new frm_printcopy("Print", "", funs.Select_vt_id_vid(ansGridView5.Rows[ansGridView5.CurrentRow.Index].Cells["Vi_id"].Value.ToString()));
                frm.directmode = "multipleprint";
                frm.ShowDialog();

                OtherReport rpt = new OtherReport();
                for (int i = 0; i < ansGridView5.Rows.Count; i++)
                {
                    if (bool.Parse(ansGridView5.Rows[i].Cells["select"].Value.ToString()) == true)
                    {
                        String[] print_option = frm.copyname1.Split(';');

                        for (int j = 0; j < print_option.Length; j++)
                        {
                            if (print_option[j] != "")
                            {
                                rpt.voucherprint(this, funs.Select_vt_id_vid(ansGridView5.Rows[i].Cells["Vi_id"].Value.ToString()), ansGridView5.Rows[i].Cells["Vi_id"].Value.ToString(), print_option[j], true, "Print");
                            }
                        }
                    }
                }

                MessageBox.Show("Done..");
                this.Close();
                this.Dispose();
            }
        }
Ejemplo n.º 2
0
        private void button4_Click(object sender, EventArgs e)
        {
            string        vid = IsDocumentNumber(label5.Text);
            frm_printcopy frm = new frm_printcopy("View", vid, funs.Select_vt_id_vid(vid));

            frm.Show();
        }
Ejemplo n.º 3
0
        void btn_Click(object sender, EventArgs e)
        {
            Button tbtn = (Button)sender;
            string name = tbtn.Name.ToString();

            if (name == "print")
            {
                frm_printcopy frm = new frm_printcopy("Print", "", funs.Select_vt_id_vid(ansGridView5.Rows[ansGridView5.CurrentRow.Index].Cells["Vi_id"].Value.ToString()));
                frm.directmode = "multipleprint";
                frm.ShowDialog();

                OtherReport rpt = new OtherReport();
                for (int i = 0; i < ansGridView5.Rows.Count; i++)
                {
                    if (ansGridView5.Rows[i].Cells["select"].Value != null)
                    {
                        if (bool.Parse(ansGridView5.Rows[i].Cells["select"].Value.ToString()) == true)
                        {
                            String[] print_option = frm.copyname1.Split(';');

                            for (int j = 0; j < print_option.Length; j++)
                            {
                                if (print_option[j] != "")
                                {
                                    rpt.voucherprint(this, funs.Select_vt_id_vid(ansGridView5.Rows[i].Cells["Vi_id"].Value.ToString()), ansGridView5.Rows[i].Cells["Vi_id"].Value.ToString(), print_option[j], true, "Print");
                                }
                            }
                        }
                    }
                }

                MessageBox.Show("Done..");
                this.Close();
                this.Dispose();
            }
            else if (name == "quit")
            {
                this.Close();
                this.Dispose();
            }
        }