private void cmdAdd_Click(object sender, EventArgs e) { GL.frmJournalUpdate ifrmChild = new GL.frmJournalUpdate(this); ifrmChild.MdiParent = this.MdiParent; ifrmChild.Show(); ifrmChild.WindowState = FormWindowState.Maximized; }
private void cmdAdd_Click(object sender, EventArgs e) { if (customGridView1.SelectedCells.Count > 0) { DateTime tglJournal = (DateTime)customGridView1.SelectedCells[0].OwningRow.Cells["hTanggal"].Value; string kodeGudang = customGridView1.SelectedCells[0].OwningRow.Cells["hKodeGudang"].Value.ToString(); string periode = tglJournal.ToString("yyyyMM"); if (!Class.PeriodeClosing.IsGLClosed(periode, kodeGudang)) { GL.frmJournalUpdate ifrmChild = new GL.frmJournalUpdate(this, cboCabang.SelectedValue.ToString()); ifrmChild.MdiParent = this.MdiParent; ifrmChild.Show(); ifrmChild.WindowState = FormWindowState.Maximized; } else { MessageBox.Show("Sudah Closing", "Informasi"); } } else { GL.frmJournalUpdate ifrmChild = new GL.frmJournalUpdate(this, cboCabang.SelectedValue.ToString()); ifrmChild.MdiParent = this.MdiParent; ifrmChild.Show(); ifrmChild.WindowState = FormWindowState.Maximized; } }
private void cmdEdit_Click(object sender, EventArgs e) { if (customGridView1.SelectedCells.Count > 0) { Guid rowID = new Guid(customGridView1.SelectedCells[0].OwningRow.Cells["hRowID"].Value.ToString()); string recID = customGridView1.SelectedCells[0].OwningRow.Cells["hRecordID"].Value.ToString(); GL.frmJournalUpdate ifrmChild = new GL.frmJournalUpdate(this, rowID, recID); ifrmChild.MdiParent = this.MdiParent; ifrmChild.Show(); ifrmChild.WindowState = FormWindowState.Maximized; } }