Ejemplo n.º 1
0
        private bool CheckConn()
        {
            try
            {
                string sServer = Sunrise.ERP.BaseControl.ConnectSetting.GetAppConfig("ServerName", true);
                string sDataBase = Sunrise.ERP.BaseControl.ConnectSetting.GetAppConfig("DataBase", true);
                string sUser = Sunrise.ERP.BaseControl.ConnectSetting.GetAppConfig("UserName", true);
                string sPassword = Sunrise.ERP.BaseControl.ConnectSetting.GetAppConfig("Password", true);
                string sConn = "Data Source=" + sServer + ";Initial Catalog=" + sDataBase + ";User ID=" + sUser + ";Password="******"" && sDataBase != "" && sUser != "" && sPassword != "")
                {
                    SqlConnection conn = new SqlConnection(sConn);
                    conn.Open();
                    timer1.Enabled = false;
                    return false;

                }
                else
                {
                    frmSysConnSet frm = new frmSysConnSet();
                    timer1.Enabled = false;
                    frm.ShowDialog();
                    return false;
                }
            }
            catch
            {
                frmSysConnSet frm = new frmSysConnSet();
                timer1.Enabled = false;
                frm.ShowDialog();
                return false;

            }
        }
Ejemplo n.º 2
0
 /// <summary>
 /// ���ݿ���������
 /// </summary>
 private void barDataBaseLinkSet_ItemClick(object sender, ItemClickEventArgs e)
 {
     frmSysConnSet frm = new frmSysConnSet();
     frm.ShowDialog();
 }
Ejemplo n.º 3
0
 private void btnSet_Click(object sender, EventArgs e)
 {
     frmSysConnSet frm = new frmSysConnSet();
     frm.ShowDialog();
 }