Exemple #1
0
        private void cmdEdit_Click(object sender, EventArgs e)
        {
            if (GVHeader.SelectedCells.Count > 0 && GVRencana.SelectedCells.Count > 0)
            {
                Guid   rowID_  = (Guid)GVHeader.SelectedCells[0].OwningRow.Cells["RowID"].Value;
                string rowIDX_ = GVRencana.SelectedCells[0].OwningRow.Cells["RowID3"].Value.ToString();

                DataRow[] dr  = dtV.Select("RowID='" + rowID_ + "'  ");
                DataRow[] dr2 = dtH.Select("RowID='" + rowIDX_ + "' ");

                frmRencanaCashUpdateGlobal ifrmChild = new frmRencanaCashUpdateGlobal(this, dr[0], dr2[0]);
                //ifrmChild.MdiParent = Program.MainFormfrmRencanaCashUpdateGlobal
                //Program.MainForm.RegisterChild(ifrmChild);
                //ifrmChild.Show();
                ifrmChild.ShowDialog();
            }
            else
            {
                MessageBox.Show(Messages.Error.RowNotSelected);
            }
        }
Exemple #2
0
        private void cmdAdd_Click(object sender, EventArgs e)
        {
            if (GVHeader.SelectedCells.Count > 0)
            {
                Guid rowID_ = (Guid)GVHeader.SelectedCells[0].OwningRow.Cells["RowID"].Value;
                if (rowID_.Equals(Guid.Empty))
                {
                    return;
                }

                DataRow[] dr = dtV.Select("RowID='" + rowID_.ToString() + "'  ");

                frmRencanaCashUpdateGlobal ifrmChild = new frmRencanaCashUpdateGlobal(this, dr[0]);
                //ifrmChild.MdiParent = Program.MainForm;
                //Program.MainForm.RegisterChild(ifrmChild);
                //ifrmChild.Show();
                ifrmChild.ShowDialog();
            }
            else
            {
                MessageBox.Show(Messages.Error.RowNotSelected);
            }
        }