Ejemplo n.º 1
0
        private void dashboardViewer1_ConfigureDataConnection(object sender, DevExpress.DashboardCommon.DashboardConfigureDataConnectionEventArgs e)
        {
            if (e.DataSourceName == "localhost_PRESUPUESTO_Connection")
            {
                // Gets the connection parameters used to establish a connection to the database.
                Access97ConnectionParameters parameters =
                    (Access97ConnectionParameters)e.ConnectionParameters;

                // Specifies the user name used to access the database file.
                parameters.UserName = "******";
                // Specifies the password used to access the database file.
                parameters.Password = "******";
            }
        }
Ejemplo n.º 2
0
        void dbs_ConfigureDataConnection(object sender, DevExpress.DashboardCommon.DashboardConfigureDataConnectionEventArgs e)
        {
            if (e.DataSourceName == "MainSource")
            {
                MsSqlCEConnectionParameters ceconn = (MsSqlCEConnectionParameters)e.ConnectionParameters;
                //string lcurrentconn = ceconn.FileName;
                ceconn.FileName = Application.StartupPath + @"\cab\" + AppInit.CompanyInfo.DbName + ".sdf";

                //int lstartidx = lcurrentconn.IndexOf(@"\cab\");
                //int lendidx = lcurrentconn.LastIndexOf(".sdf")-1;
                //string ldbname = lcurrentconn.Substring(lstartidx + 5, lcurrentconn.Length - lendidx);

                //if (lcurrentconn.Contains(ldbname))
                //{
                //    lcurrentconn = lcurrentconn.Replace(ldbname, AppInit.CompanyInfo.DbName == null ? ldbname + ".sdf" : AppInit.CompanyInfo.DbName + ".sdf");
                //    ceconn.FileName = lcurrentconn;
                //}
            }
        }
Ejemplo n.º 3
0
 private void dashboardDesigner1_ConfigureDataConnection(object sender, DevExpress.DashboardCommon.DashboardConfigureDataConnectionEventArgs e)
 {
 }