using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace HesabdariSubSys
{
    public partial class HesMDI : Form
    {
        frmBooks frm1;
        frmCkecks frm2;
        frmRoozanehBook frm3;
        frmInhebitantEndBook frm4;
        frmSalary frm5;
        frmMerchanDiseBuyBook frm6;
        frmChSandoogh frm7;
        frmPensionBook frm8;
        frmReportSalary frm9;
        frmReportMerchBuyBook frm10;
        frmReportCashBook frm11;
        frmReportRooznameBooks frm12;
        frmReportChech frm13;

        public HesMDI()
        {
            InitializeComponent();
        }

        private void HesMDI_Load(object sender, EventArgs e)
        {

        }

        private void Mnu_File_Exit_Click(object sender, EventArgs e)
        {
            Application.Exit();
        }

        private void Mnu_Help_About_Click(object sender, EventArgs e)
        {
            MessageBox.Show("سیستم حسابداری نسخه 1");
        }

        private void Mnu_File_BookName_Click(object sender, EventArgs e)
        {
            if (frm1 == null || frm1.IsDisposed)
            {
                frm1 = new frmBooks();
                frm1.MdiParent = this;
                frm1.Show();
            }
            else
            {
                frm1.Activate();
            }
        }

        private void ssToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (frm2 == null || frm2.IsDisposed)
            {
                frm2 = new frmCkecks();
                frm2.MdiParent = this;
                frm2.Show();
            }
            else
            {
                frm2.Activate();
            }
        }

        private void HesMDI_FormClosed(object sender, FormClosedEventArgs e)
        {
            Application.Exit();
        }

        private void Mnu_File_Roozname_Click(object sender, EventArgs e)
        {
            if (frm3 == null || frm3.IsDisposed)
            {
                frm3 = new frmRoozanehBook();
                frm3.MdiParent = this;
                frm3.Show();
            }
            else
            {
                frm3.Activate();
            }

        }

        private void Mnu_File_Inhab_Click(object sender, EventArgs e)
        {

            if (frm4 == null || frm4.IsDisposed)
            {
                frm4 = new frmInhebitantEndBook();
                frm4.MdiParent = this;
                frm4.Show();
            }
            else
            {
                frm4.Activate();
            }
        }

        private void toolStripMenuItem7_Click(object sender, EventArgs e)
        {
            if (frm5 == null || frm5.IsDisposed)
            {
                frm5 = new frmSalary();
                frm5.MdiParent = this;
                frm5.Show();
            }
            else
            {
                frm5.Activate();
            }
        }

        private void Mnu_File_MerchBuyBook_Click(object sender, EventArgs e)
        {
            if (frm6 == null || frm6.IsDisposed)
            {
                frm6 = new frmMerchanDiseBuyBook();
                frm6.MdiParent = this;
                frm6.Show();
            }
            else
            {
                frm6.Activate();
            }
        }

        private void Mnu_File_CachBook_Click(object sender, EventArgs e)
        {
            if (frm7 == null || frm7.IsDisposed)
            {
                frm7 = new frmChSandoogh();
                frm7.MdiParent = this;
                frm7.Show();
            }
            else
            {
                frm7.Activate();
            }

        }

        private void aaToolStripMenuItem_Click(object sender, EventArgs e)
        {

            if (frm8 == null || frm8.IsDisposed)
            {
                frm8 = new frmPensionBook();
                frm8.MdiParent = this;
                frm8.Show();
            }
            else
            {
                frm8.Activate();
            }
        }

        private void Mnu_Reports_Salary_Click(object sender, EventArgs e)
        {

            if (frm9 == null || frm9.IsDisposed)
            {
                frm9 = new frmReportSalary();
                frm9.MdiParent = this;
                frm9.Show();
            }
            else
            {
                frm9.Activate();
            }
        }

        private void Mnu_Reports_MerchBuyBook_Click(object sender, EventArgs e)
        {
            if (frm10 == null || frm10.IsDisposed)
            {
                frm10 = new frmReportMerchBuyBook();
                frm10.MdiParent = this;
                frm10.Show();
            }
            else
            {
                frm10.Activate();
            }
        }

        private void Mnu_Reports_CashBook_Click(object sender, EventArgs e)
        {
            if (frm11 == null || frm11.IsDisposed)
            {
                frm11 = new frmReportCashBook();
                frm11.MdiParent = this;
                frm11.Show();
            }
            else
            {
                frm11.Activate();
            }

        }

        private void Mnu_Reports_RooznameBooks_Click(object sender, EventArgs e)
        {
            if (frm12 == null || frm12.IsDisposed)
            {
                frm12 = new frmReportRooznameBooks();
                frm12.MdiParent = this;
                frm12.Show();
            }
            else
            {
                frm12.Activate();
            }
        }

        private void Mnu_Reports_Checkss_Click(object sender, EventArgs e)
        {
            if (frm13 == null || frm13.IsDisposed)
            {
                frm13 = new frmReportChech();
                frm13.MdiParent = this;
                frm13.Show();
            }
            else
            {
                frm13.Activate();
            }
        }
    }
}
