Exemplo n.º 1
0
 private void barButtonItem19_ItemClick(object sender, ItemClickEventArgs e)
 {
     if (BioBLL.CheckConnection())
     {
         this.GetLogin();
     }
     else
     {
         DiaglogFrm.frmConfig frm = new DiaglogFrm.frmConfig();
         frm.ShowDialog(this);
         if (frm.isConnected)
         {
             Application.Restart();
         }
     }
 }
Exemplo n.º 2
0
 private void FrmStartup_Load(object sender, EventArgs e)
 {
     if (BioBLL.CheckConnection())
     {
         this.GetLogin();
     }
     else
     {
         DiaglogFrm.frmConfig frm = new DiaglogFrm.frmConfig();
         frm.ShowDialog(this);
         if (frm.isConnected)
         {
             Application.Restart();
         }
     }
 }
Exemplo n.º 3
0
 private void butConnect_Click(object sender, EventArgs e)
 {
     try
     {
         if (BioBLL.CheckConnection(this.cbxServerName.Text.Trim(), this.txtUserName.Text.Trim(), this.txtPassword.Text.Trim(), this.txtDataBaseName.Text.Trim()))
         {
             MessageBox.Show("Kết nối thành công đến Server: " + cbxServerName.EditValue.ToString() + ".\nChương trình tự động khởi động lại.", "iHIS - Bệnh Viện Điện Tử", MessageBoxButtons.OK, MessageBoxIcon.Information);
             this.isConnected = true;
             this.Close();
         }
         else
         {
             MessageBox.Show("Kết nối đến server " + cbxServerName.EditValue.ToString() + ", database: " + this.txtDataBaseName.Text + ", userName: "******" không thành công! \r\n Vui lòng kiểm tra lại thông tin kết nối.", "iHIS - Bệnh Viện Điện Tử", MessageBoxButtons.OK, MessageBoxIcon.Warning);
             this.cbxServerName.Focus();
         }
     }
     catch (Exception ex)
     {
         XtraMessageBox.Show("butConnect_Click: " + ex.ToString(), "iHIS - Bệnh viện điện tử", MessageBoxButtons.OK, MessageBoxIcon.Error);
         return;
     }
 }