Esempio n. 1
0
        private void button_Click(object sender, EventArgs e)
        {
            if (iniPro)
            {
                return;
            }

            Button btn = (Button)sender;

            switch (btn.Name)
            {
            case "buttonLogin":
                if (!loginProcess())
                {
                    return;
                }
                hp = new HumanProperty();
                if (!checkMembers())
                {
                    return;
                }
                if (!checkOffice())
                {
                    return;
                }
                if (!checkCommon())
                {
                    return;
                }
                if (!selectNextMenu())
                {
                    return;
                }
                //checedProcess();
                break;

            case "buttonCancel":
                labelMessage.Text      = "";
                textBoxMemberCode.Text = "";
                break;

            case "buttonEnd":
                string tempFile = Folder.DefaultLocation() + @"\.~temp.xlsx";
                if (File.Exists(tempFile))
                {
                    File.Delete(tempFile);
                }
                if (hp != null)
                {
                    Exclusive exclusive = new Exclusive();
                    exclusive.Unregister(hp.MemberCode);
                }
                Application.Exit();
                break;

            default:
                break;
            }
        }