Exemplo n.º 1
0
 private void 直接打抵押表F7ToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (this.IsChecked())
     {
         int            i       = this.dataGridView1.SelectedRows[0].Index;
         VehicleInfo    vehicle = this.pager.Lists[i] as VehicleInfo;
         F7ExcelPrinter printer = new F7ExcelPrinter(vehicle);
         printer.PaintPrinter();
     }
 }
Exemplo n.º 2
0
 void dataGridView1_KeyDown(object sender, KeyEventArgs e)
 {
     if (this.dataGridView1.SelectedRows.Count > 0)
     {
         int                    i       = this.dataGridView1.SelectedRows[0].Index;
         VehicleInfo            vehicle = this.pager.Lists[i] as VehicleInfo;
         BaseVehicleInfoPrinter printer = null;
         if (e.KeyCode == Keys.F1)
         {
             printer = new F1Printer(vehicle);
         }
         else if (e.KeyCode == Keys.F2)
         {
             printer = new F2ExcelPrinter(vehicle);
             printer.PaintPrinter();
             return;
         }
         else if (e.KeyCode == Keys.F3)
         {
             printer = new F3Printer(vehicle);
         }
         else if (e.KeyCode == Keys.F4)
         {
             printer = new F4Printer(vehicle);
         }
         else if (e.KeyCode == Keys.F5)
         {
             printer = new F5Printer(vehicle);
             //printer = new F5Printer(this.student);
         }
         else if (e.KeyCode == Keys.F6)
         {
             printer = new F6ExcelPrinter(vehicle);
             printer.PaintPrinter();
             return;
         }
         else if (e.KeyCode == Keys.F7)
         {
             printer = new F7ExcelPrinter(vehicle);
             printer.PaintPrinter();
             return;
         }
         if (printer != null)
         {
             this.Print(printer);
             //commonPrinter.ShowPreviewPrinter();
         }
     }
     //throw new Exception("The method or operation is not implemented.");
 }
Exemplo n.º 3
0
        void dataGridView1_KeyDown(object sender, KeyEventArgs e)
        {
            if (this.dataGridView1.SelectedRows.Count > 0)
            {
                int i = this.dataGridView1.SelectedRows[0].Index;
                VehicleInfo vehicle = this.pager.Lists[i] as VehicleInfo;
                BaseVehicleInfoPrinter printer = null;
                if (e.KeyCode == Keys.F1)
                {
                    printer = new F1Printer(vehicle);
                }
                else if (e.KeyCode == Keys.F2)
                {
                    printer = new F2ExcelPrinter(vehicle);
                    printer.PaintPrinter();
                    return;
                }
                else if (e.KeyCode == Keys.F3)
                {
                    printer = new F3Printer(vehicle);
                }
                else if (e.KeyCode == Keys.F4)
                {
                    printer = new F4Printer(vehicle);

                }
                else if (e.KeyCode == Keys.F5)
                {
                    printer = new F5Printer(vehicle);
                    //printer = new F5Printer(this.student);
                }
                else if (e.KeyCode == Keys.F6)
                {
                    printer = new F6ExcelPrinter(vehicle);
                    printer.PaintPrinter();
                    return;
                }
                else if (e.KeyCode == Keys.F7)
                {
                    printer = new F7ExcelPrinter(vehicle);
                    printer.PaintPrinter();
                    return;
                }
                if (printer != null)
                {
                    this.Print(printer);
                    //commonPrinter.ShowPreviewPrinter();
                }
            }
            //throw new Exception("The method or operation is not implemented.");
        }
Exemplo n.º 4
0
 private void ֱ�Ӵ��Ѻ��F7ToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (this.IsChecked())
     {
         int i = this.dataGridView1.SelectedRows[0].Index;
         VehicleInfo vehicle = this.pager.Lists[i] as VehicleInfo;
         F7ExcelPrinter printer = new F7ExcelPrinter(vehicle);
         printer.PaintPrinter();
     }
 }