Exemplo n.º 1
0
 public QDAddinDrillDown(QDConfig config, string Pos, Excel._Application xls, QueryBuilder.SQLBuilder sqBuilder, string connectDesc)
 {
     InitializeComponent();
     _config = config;
     Init(Pos, xls, sqBuilder);
     //_strConnectDes = sqBuilder.StrConnectDes;
     //ThemeResolutionService.ApplyThemeToControlTree(this, THEME);
 }
Exemplo n.º 2
0
 public QDAddinDrillDown(QDConfig config, string Pos, Excel._Application xls, string formular, string connectDesc, string user)
 {
     InitializeComponent();
     _config = config;
     _user   = user;
     //_strConnectDes = connectDesc;
     Init(Pos, xls, formular);
     _sqlBuilder.StrConnectDes = connectDesc;
     //ThemeResolutionService.ApplyThemeToControlTree(this, THEME);
 }
Exemplo n.º 3
0
 public QDAddinDrillDown(QDConfig config, string connectDesc)
 {
     InitializeComponent();
     //_strConnectDes = connectDesc;
     _config     = config;
     _sqlBuilder = new QueryBuilder.SQLBuilder(processingMode.Balance);
     _sqlBuilder.StrConnectDes = connectDesc;
     //TopMost = true;
     //ThemeResolutionService.ApplyThemeToControlTree(this, THEME);
 }
Exemplo n.º 4
0
 public QDAddIn(QDConfig confi, string Pos, Excel._Application xls, string formular, string connect, string connectDes, string user)
 {
     InitializeComponent();
     ////ThemeResolutionService.ApplyThemeToControlTree(this, THEME);
     _user          = user;
     _strConnect    = connect;
     _strConnectDes = connectDes;
     _config        = confi;
     Init(Pos, xls, formular);
 }
Exemplo n.º 5
0
        public QDAddIn(QDConfig config, string connect, string connectDes)
        {
            InitializeComponent();
            ////ThemeResolutionService.ApplyThemeToControlTree(this, THEME);
            _sqlBuilder = new QueryBuilder.SQLBuilder(processingMode.Balance);
            DataTable dtcom  = QueryBuilder.Parsing.GetListNumberAgregate();
            DataRow   newrow = dtcom.NewRow();

            newrow["Code"] = newrow["Description"] = "";
            dtcom.Rows.Add(newrow);
            ((DataGridViewComboBoxColumn)dgvSelectNodes.Columns["colAgregate"]).DataSource    = dtcom;
            ((DataGridViewComboBoxColumn)dgvSelectNodes.Columns["colAgregate"]).DisplayMember = "Code";
            ((DataGridViewComboBoxColumn)dgvSelectNodes.Columns["colAgregate"]).ValueMember   = "Code";
            //TopMost = true;
            _config        = config;
            _strConnect    = connect;
            _strConnectDes = connectDes;
        }
Exemplo n.º 6
0
        private static void LoadConfig(string db)
        {
            string __documentDirectory = System.Environment.GetFolderPath(System.Environment.SpecialFolder.MyDocuments) + "\\" + Form_QD.DocumentFolder;
            string _strConnect         = "";
            string _strConnectDes      = "";
            string __templatePath      = "";
            string __reportPath        = "";
            string _appPath            = Application.StartupPath;

            try
            {
                QDConfig _config = new QDConfig();
                if (File.Exists(__documentDirectory + "\\Configuration\\QDConfig.tvc"))
                {
                    _config.LoadConfig(__documentDirectory + "\\Configuration\\QDConfig.tvc");

                    string key = "";
                    _strConnect    = _config.GetConnection(ref key, "QD");
                    key            = "";
                    _strConnectDes = _config.GetConnection(ref key, "AP");

                    if (_config.DIR.Rows.Count > 0)
                    {
                        __templatePath = _config.DIR.Rows[0]["TMP"].ToString();
                        __reportPath   = _config.DIR.Rows[0]["RPT"].ToString();
                    }

                    if (_config.SYS.Rows.Count > 0)
                    {
                        ReportGenerator.User2007 = (bool)_config.SYS.Rows[0][_config.SYS.USE2007Column];
                    }
                }
                QueryBuilder.SQLBuilder.SetConnection(_strConnect);
                ReportGenerator.Config = _config;
                CmdManager.Db          = db;
                CmdManager.AppConnect  = _strConnect;
                CmdManager.RepConnect  = _strConnectDes;
                CmdManager.ReptPath    = __reportPath;
                CmdManager.TempPath    = __templatePath;
            }
            catch (Exception ex)
            {
            }
        }
Exemplo n.º 7
0
        private QDConfig GetDataSetConfig(QDConfig dset)
        {
            if (dset.Tables["DTB"].Rows.Count > 0)
            {
                dset.Tables["DTB"].Rows[0]["QD"] = ddlQD.Text;
                dset.Tables["DTB"].Rows[0]["AP"] = ddlAP.Text;
            }
            else
            {
                DataRow row = dset.Tables["DTB"].NewRow();
                row["QD"] = ddlQD.Text;
                row["AP"] = ddlAP.Text;
                dset.Tables["DTB"].Rows.Add(row);
            }

            if (dset.Tables["DIR"].Rows.Count > 0)
            {
                dset.Tables["DIR"].Rows[0]["TMP"] = txtTMP.Text;
                dset.Tables["DIR"].Rows[0]["RPT"] = txtRPT.Text;
            }
            else
            {
                DataRow row = dset.Tables["DIR"].NewRow();
                row["TMP"] = txtTMP.Text;
                row["RPT"] = txtRPT.Text;
                dset.Tables["DIR"].Rows.Add(row);
            }
            if (dset.Tables["SYS"].Rows.Count > 0)
            {
                dset.Tables["SYS"].Rows[0]["FONT"] = txtFont.Text;
                if (panelForce.BackColor != SystemColors.Control)
                {
                    TypeConverter tc    = TypeDescriptor.GetConverter(typeof(Color));
                    string        color = tc.ConvertToString(panelForce.BackColor);
                    dset.Tables["SYS"].Rows[0]["FORCECOLOR"] = color;
                }
                else
                {
                    dset.Tables["SYS"].Rows[0]["FORCECOLOR"] = "";
                }
                if (panelBack.BackColor != SystemColors.Control)
                {
                    TypeConverter tc    = TypeDescriptor.GetConverter(typeof(Color));
                    string        color = tc.ConvertToString(panelBack.BackColor);
                    dset.Tables["SYS"].Rows[0]["BACKCOLOR"] = color;
                }
                else
                {
                    dset.Tables["SYS"].Rows[0]["BACKCOLOR"] = "";
                }
            }
            else
            {
                DataRow row = dset.Tables["SYS"].NewRow();
                row["FONT"] = txtFont.Text;
                if (panelForce.BackColor != SystemColors.Control)
                {
                    TypeConverter tc    = TypeDescriptor.GetConverter(typeof(Color));
                    string        color = tc.ConvertToString(panelForce.BackColor);
                    row["FORCECOLOR"] = color;
                }
                else
                {
                    row["FORCECOLOR"] = "";
                }
                if (panelBack.BackColor != SystemColors.Control)
                {
                    TypeConverter tc    = TypeDescriptor.GetConverter(typeof(Color));
                    string        color = tc.ConvertToString(panelBack.BackColor);
                    row["BACKCOLOR"] = color;
                }
                else
                {
                    row["BACKCOLOR"] = "";
                }
                dset.Tables["SYS"].Rows.Add(row);
            }
            return(dset);
        }
Exemplo n.º 8
0
 public frmDBDef(QDConfig config)
 {
     InitializeComponent();
     _config = config;
 }