Esempio n. 1
0
 public ConnectDB(String host, InitC initc)
 {
     initC = initc;
     if (host == "bit")
     {
         connBIT = new SqlConnection();
         //connMainHIS.ConnectionString = GetConfig(hostName);
         connBIT.ConnectionString = "Server=" + initC.hostDBBIT + ";Database=" + initC.databaseDBBIT + ";Uid=" + initC.userDBBIT + ";Pwd=" + initC.passDBBIT + ";Connection Timeout=300;";
     }
     else if (host == "orc_ma")
     {
         connORCMA = new MySqlConnection();
         connORCMA.ConnectionString = "Server=" + initC.hostDBORCMA + ";Database=" + initC.databaseDBORCMA + ";Uid=" + initC.userDBORCMA + ";Pwd=" + initC.passDBORCMA + ";port = " + initC.portDBORCMA + ";Connection Timeout = 300;default command timeout=0; CharSet=utf8;";
     }
     else if (host == "orc_ba")
     {
         connORCBA = new MySqlConnection();
         connORCBA.ConnectionString = "Server=" + initC.hostDBORCBA + ";Database=" + initC.databaseDBORCBA + ";Uid=" + initC.userDBORCBA + ";Pwd=" + initC.passDBORCBA + ";port = " + initC.portDBORCBA + ";Connection Timeout = 300;default command timeout=0; CharSet=utf8;";
     }
     else if (host == "orc_bit")
     {
         connORCBIT = new MySqlConnection();
         connORCBIT.ConnectionString = "Server=" + initC.hostDBKFCPO + ";Database=" + initC.databaseDBKFCPO + ";Uid=" + initC.userDBKFCPO + ";Pwd=" + initC.passDBKFCPO + ";port = " + initC.portDBKFCPO + ";Connection Timeout = 300;default command timeout=0; CharSet=utf8;";
     }
     else if (host == "bithis")
     {
         connBITDemo = new SqlConnection();
         connBITDemo.ConnectionString = "Server=" + initC.hostDBBITDemo + ";Database=" + initC.databaseDBBITDemo + ";Uid=" + initC.userDBBITDemo + ";Pwd=" + initC.passDBBITDemo + ";Connection Timeout=300;";
     }
     else if (host == "kfc_po")
     {
         connKFC = new MySqlConnection();
         connKFC.ConnectionString = "Server=" + initC.hostDBKFCPO + ";Database=" + initC.databaseDBKFCPO + ";Uid=" + initC.userDBKFCPO + ";Pwd=" + initC.passDBKFCPO + ";port = " + initC.portDBKFCPO + ";Connection Timeout = 300;default command timeout=0; CharSet=utf8;";
     }
 }
Esempio n. 2
0
        public ControlRDPO()
        {
            iniFile = new IniFile(Environment.CurrentDirectory + "\\" + Application.ProductName + ".ini");
            initC   = new InitC();
            GetConfig();

            conn      = new ConnectDB("kfc_po", initC);
            xCLFPTDB  = new XcustLinfoxPrTblDB(conn);
            xCPRHIADB = new XcustPorReqHeaderIntAllDB(conn);
            xCPRLIADB = new XcustPorReqLineIntAllDB(conn);
            xCPRDIADB = new XcustPorReqDistIntAllDB(conn);

            fontSize9 = 9.75f;
            fontSize8 = 8.25f;
            fV1B      = new Font(fontName, fontSize9, FontStyle.Bold);
            fV1       = new Font(fontName, fontSize8, FontStyle.Regular);
        }