private void dataGridView1_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.F12) { if (_KodeToko != "") { SIP.frmRptSIP ifrmChild = new SIP.frmRptSIP(this, _KodeToko, _RowID, false); ifrmChild.MdiParent = Program.MainForm; Program.MainForm.RegisterChild(ifrmChild); ifrmChild.Show(); } } if (e.KeyCode == Keys.F9) { if (_KodeToko != "") { SIP.frmRptSIP ifrmChild = new SIP.frmRptSIP(this, _KodeToko, _RowID, true); ifrmChild.MdiParent = Program.MainForm; Program.MainForm.RegisterChild(ifrmChild); ifrmChild.Show(); } } }
private void dataGridView1_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.F12) { if (_KodeToko != "") { SIP.frmRptSIP ifrmChild = new SIP.frmRptSIP(this, _KodeToko, _RowID, false); ifrmChild.MdiParent = Program.MainForm; Program.MainForm.RegisterChild(ifrmChild); ifrmChild.Show(); } } if (e.KeyCode == Keys.F9) { if (_KodeToko != "") { SIP.frmRptSIP ifrmChild = new SIP.frmRptSIP(this, _KodeToko, _RowID, true); ifrmChild.MdiParent = Program.MainForm; Program.MainForm.RegisterChild(ifrmChild); ifrmChild.Show(); } } if (e.KeyCode == Keys.F10) { if (_KodeToko != "") { SIP.frmPerbandinganItemToko ifrmChild = new SIP.frmPerbandinganItemToko(this, _KodeToko); ifrmChild.MdiParent = Program.MainForm; Program.MainForm.RegisterChild(ifrmChild); ifrmChild.Show(); } } if (e.KeyCode == Keys.F11) { if (_KodeToko != "") { string kodeToko = Tools.isNull(dataGridView1.SelectedCells[0].OwningRow.Cells["KodeToko"].Value, string.Empty).ToString(); string namaToko = Tools.isNull(dataGridView1.SelectedCells[0].OwningRow.Cells["NamaToko"].Value, string.Empty).ToString(); string alamatToko = Tools.isNull(dataGridView1.SelectedCells[0].OwningRow.Cells["Alamat"].Value, string.Empty).ToString(); string kotaToko = Tools.isNull(dataGridView1.SelectedCells[0].OwningRow.Cells["Kota"].Value, string.Empty).ToString(); string wilID = Tools.isNull(dataGridView1.SelectedCells[0].OwningRow.Cells["IdWil"].Value, string.Empty).ToString(); SIP.frmRptProgresSKUToko ifrmChild = new SIP.frmRptProgresSKUToko(kodeToko, namaToko, alamatToko, kotaToko, wilID); ifrmChild.MdiParent = Program.MainForm; Program.MainForm.RegisterChild(ifrmChild); ifrmChild.Show(); } } }