예제 #1
0
        private void addToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmMaintainParcels parcels = new frmMaintainParcels(getUserID());
            frmParcelDetails   details = new frmParcelDetails(parcels, true, getUserID());
            frmParent          parent  = this;

            details.MdiParent = parent;
            details.Show();
        }
        private void btnAddNewParcel_Click(object sender, EventArgs e)
        {
            frmMaintainParcels maintain = this;
            frmParcelDetails   details  = new frmParcelDetails(maintain, true, userID);

            details.Show();

            con.Close();
        }
예제 #3
0
        private void addToolStripMenuItem_Click(object sender, EventArgs e)
        {
            maintain = new frmMaintainParcels();
            frmParent        parent  = this;
            frmParcelDetails details = new frmParcelDetails(maintain);

            details.disableButton(true);
            details.MdiParent = parent;
            details.Show();
        }
예제 #4
0
        private void btnAddNewParcel_Click(object sender, EventArgs e)
        {
            frmMaintainParcels maintain = this;
            frmParcelDetails   details  = new frmParcelDetails(maintain);

            details.disableButton(true);
            details.Show();

            con.Close();
        }
예제 #5
0
        private void btnUpdateParcel_Click(object sender, EventArgs e)
        {
            frmMaintainParcels maintain = this;
            frmParcelDetails   details  = new frmParcelDetails(maintain);

            details.setParcelID(dgvParcels.SelectedCells[0].Value.ToString());
            details.autoFillForm();
            details.disableButton(false);
            details.Show();

            //to do: fill frmParcelDetails fields with selected data entry
        }
        private void btnUpdateParcel_Click(object sender, EventArgs e)
        {
            frmMaintainParcels maintain = this;

            if (Int32.TryParse(dgvParcels.SelectedCells[0].Value.ToString(), out int i))
            {
                frmParcelDetails details = new frmParcelDetails(maintain, false, userID);
                details.setParcelID(dgvParcels.SelectedCells[0].Value.ToString());
                details.autoFillForm();
                details.Show();
            }
        }