Beispiel #1
0
        private void bttGenFatt_Click(object sender, EventArgs e)
        {
            frmModFattura newForm = new frmModFattura();

            newForm.MdiParent = this.MdiParent;
            newForm.frmParent = this;

            newForm.TipoDoc = frmModFattura.ETypeDoc.TD_FAT;

            if (!VerificaSelezione())
            {
                newForm.Dispose();
                return;
            }

            for (int i = 0; i < dgvResult.Rows.Count; i++)
            {
                if (dgvResult["ColChk", i].Value != null && (bool)dgvResult["ColChk", i].Value)
                {
                    newForm.InsertDettViaggio((int)dgvResult["ID", i].Value);
                }
            }

            this.Hide();
            newForm.Show();
        }
Beispiel #2
0
        private void bttModifica_Click(object sender, EventArgs e)
        {
            frmModFattura frmNew = new frmModFattura();

            frmNew.MdiParent = this.MdiParent;
            frmNew.frmParent = this;
            frmNew.IdSel     = (int)dgvResult["ID", dgvResult.CurrentRow.Index].Value;

            this.Hide();
            frmNew.Show();
        }
        private void tsmiDocFatture_Click(object sender, EventArgs e)
        {
            int count = 0;

            foreach (Form childForm in MdiChildren)
            {
                if (childForm.GetType().ToString() == "Trucks.frmModFattura")
                {
                    MessageBox.Show("Finestra Fatture/Note di Credito già aperta.", "Attenzione", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                    childForm.Focus();
                    count++;
                }
            }
            if (count == 0)
            {
                Form childForm = new frmModFattura();
                childForm.MdiParent = this;
                childFormNumber++;
                childForm.Show();
            }
        }
Beispiel #4
0
        private void bttNuovaNDC_Click(object sender, EventArgs e)
        {
            int count = 0;

            foreach (Form childForm in this.MdiParent.MdiChildren)
            {
                if (childForm.GetType().ToString() == "Trucks.frmModFattura")
                {
                    MessageBox.Show("Finestra Fatture/Note di Credito già aperta.", "Attenzione", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);

                    childForm.Focus();
                    count++;
                }
            }
            if (count == 0)
            {
                Form childForm = new frmModFattura();
                childForm.MdiParent = this.MdiParent;
                ((frmModFattura)childForm).frmParent = this;
                ((frmModFattura)childForm).TipoDoc   = frmModFattura.ETypeDoc.TD_NDC;
                this.Hide();
                childForm.Show();
            }
        }