private void btnPick_Click(object sender, EventArgs e) { fmPickList pl = new fmPickList(); if (pl.ReturnNoOfOrders(Globals.theWinlogon) > 0) { pl.ShowDialog(Globals.theWinlogon); } else { if (pl.ReturnNoOfOrders("") > 0) { pl.ShowDialog(""); } else { fmWarehouseShipmentHeaderList sl = new fmWarehouseShipmentHeaderList(); sl.ShowDialog(); } } }
protected override bool ProcessCmdKey(ref Message msg, Keys keyData) { if (keyData == Keys.Enter) { if (dataGridView1.CurrentRow == null) { return(true); } //int CurIndex = dataGridView1.CurrentRow.Index; fmPickOrder po = new fmPickOrder(dataGridView1.CurrentRow.Cells[0].Value.ToString()); po.ShowDialog(); GetPickOrders(userid); //dataGridView1.CurrentCell = dataGridView1.Rows[CurIndex].Cells[0]; return(true); } if (keyData == Keys.D0) { if (dataGridView1.CurrentRow == null) { return(true); } int CurIndex = dataGridView1.CurrentRow.Index; fmWarehouseFright wf = new fmWarehouseFright(dataGridView1.CurrentRow.Cells[4].Value.ToString()); wf.ShowDialog(); dataGridView1.CurrentCell = dataGridView1.Rows[CurIndex].Cells[0]; return(true); } if (keyData == Keys.D8) { if (dataGridView1.CurrentRow == null) { return(true); } int CurIndex = dataGridView1.CurrentRow.Index; fmWarehouseShipmentHeaderList wsl = new fmWarehouseShipmentHeaderList(); wsl.ShowDialog(); dataGridView1.CurrentCell = dataGridView1.Rows[CurIndex].Cells[0]; return(true); } if (keyData == Keys.Escape) { this.Close(); } return(base.ProcessCmdKey(ref msg, keyData)); }