Example #1
0
        private void cmdYear_Click(object sender, EventArgs e)
        {
            Form fc1 = Application.OpenForms["FRM_SMT_DM_OSD_YEAR"];

            if (fc1 != null)
            {
                fc1.Show();
            }
            else
            {
                FRM_SMT_DM_OSD_YEAR f1 = new FRM_SMT_DM_OSD_YEAR();
                f1.Show();
            }
            this.Hide();
        }
        void DWMYClick(string ButtonCap, string ButtonCD)
        {
            //MessageBox.Show(ButtonCap + "    " + ButtonCD);
            switch (ButtonCD)
            {
            case "C":
                this.Close();
                break;

            case "M":
                this.Close();
                Form fc = Application.OpenForms["FRM_SMT_DM_OSD_MONTH"];
                if (fc != null)
                {
                    fc.Show();
                }
                else
                {
                    FRM_SMT_DM_OSD_MONTH f = new FRM_SMT_DM_OSD_MONTH();
                    f.Show();
                }
                break;

            case "Y":
                this.Close();
                Form fc1 = Application.OpenForms["FRM_SMT_DM_OSD_YEAR"];
                if (fc1 != null)
                {
                    fc1.Show();
                }
                else
                {
                    FRM_SMT_DM_OSD_YEAR f1 = new FRM_SMT_DM_OSD_YEAR();
                    f1.Show();
                }
                break;
            }
        }