示例#1
0
 private void my_menu_Itemclicked(object sender, ToolStripItemClickedEventArgs e)
 {
     if (flag == false)
     {
         if (e.ClickedItem.Name == "ColHidden")
         {
             dataGridView1.Rows[this.dataGridView1.CurrentRow.Index].Visible = false;
             flag = true;
         }
         else if (e.ClickedItem.Name == "ColEdit")
         {
             mymenu.Visible = false;
             if (dataGridView1.RowCount > 0)
             {
                 eliminaFactura();
             }
             flag = true;
         }
         else if (e.ClickedItem.Name == "ColDelete")
         {
             mymenu.Visible = false;
             mymenu.Enabled = false;
             flag           = true;
             button2.PerformClick();
         }
         else if (e.ClickedItem.Name == "ColAs")
         {
             mymenu.Visible = false;
             mymenu.Enabled = false;
             var forma = new frm_detalleFactura(dataGridView1.CurrentRow.Cells[0].Value.ToString(), null, null, null, label6.Text, dataGridView1.CurrentRow.Cells[1].Value.ToString(), true, null, dataGridView1.CurrentRow.Cells[2].Value.ToString(), "CREDITO", label2.Text, 0, false);
             forma.ShowDialog();
             flag = true;
         }
     }
 }
示例#2
0
 private void dataGridView1_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e)
 {
     if (dataGridView1.RowCount > 0)
     {
         var forma = new frm_detalleFactura(dataGridView1.CurrentRow.Cells[0].Value.ToString(), dataGridView1.CurrentRow.Cells[8].Value.ToString(), dataGridView1.CurrentRow.Cells[9].Value.ToString(), dataGridView1.CurrentRow.Cells[6].Value.ToString(), dataGridView1.CurrentRow.Cells[2].Value.ToString(), dataGridView1.CurrentRow.Cells[1].Value.ToString(), true, dataGridView1.CurrentRow.Cells[7].Value.ToString(), dataGridView1.CurrentRow.Cells[3].Value.ToString(), dataGridView1.CurrentRow.Cells[11].Value.ToString(), dataGridView1.CurrentRow.Cells[10].Value.ToString(), 0, true);
         forma.ShowDialog();
     }
 }
示例#3
0
 private void button4_Click(object sender, EventArgs e)
 {
     if (dataGridView1.RowCount > 0)
     {
         var forma = new frm_detalleFactura(dataGridView1.CurrentRow.Cells[0].Value.ToString(), null, null, null, label6.Text, dataGridView1.CurrentRow.Cells[1].Value.ToString(), true, null, dataGridView1.CurrentRow.Cells[2].Value.ToString(), "CREDITO", label2.Text, 0, false);
         forma.ShowDialog();
     }
 }
示例#4
0
 private void dataGridView1_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyData == Keys.Enter)
     {
         e.SuppressKeyPress = true;
         if (dataGridView1.RowCount > 0)
         {
             var forma = new frm_detalleFactura(dataGridView1.CurrentRow.Cells[0].Value.ToString(), dataGridView1.CurrentRow.Cells[8].Value.ToString(), dataGridView1.CurrentRow.Cells[9].Value.ToString(), dataGridView1.CurrentRow.Cells[6].Value.ToString(), dataGridView1.CurrentRow.Cells[2].Value.ToString(), dataGridView1.CurrentRow.Cells[1].Value.ToString(), true, dataGridView1.CurrentRow.Cells[7].Value.ToString(), dataGridView1.CurrentRow.Cells[3].Value.ToString(), dataGridView1.CurrentRow.Cells[11].Value.ToString(), dataGridView1.CurrentRow.Cells[10].Value.ToString(), 0, true);
             forma.ShowDialog();
         }
     }
 }