Пример #1
0
    private void LOGIN_FORM_Load(object sender, EventArgs e)
    {
        string sysDBServer     = ConfigurationManager.AppSettings["oServer"];
        string sysDftDBCompany = ConfigurationManager.AppSettings["oCompanyDB"];
        string sysDBUsername   = ConfigurationManager.AppSettings["oDbUserName"];
        string sysDBPassword   = ConfigurationManager.AppSettings["oDbPassword"];

        clsDeclaration.sLclSystemConnection = clsSQLClientFunctions.GlobalConnectionString(sysDBServer, sysDftDBCompany, sysDBUsername, sysDBPassword);
        if (clsSQLClientFunctions.CheckConnection(clsDeclaration.sLclSystemConnection) == false)
        {
            SETTINGS set = new SETTINGS();
            set.ShowDialog();
        }
    }
Пример #2
0
    private void cONFIGURATIONToolStripMenuItem_Click(object sender, EventArgs e)
    {
        foreach (Form form in Application.OpenForms)
        {
            if (form.GetType() == typeof(SETTINGS))
            {
                form.Activate();
                return;
            }
        }
        SETTINGS SS = new SETTINGS();

        SS.ShowDialog();
    }