public static string Tw2bsConnectionString(string entry) { if (entry == "1") { // 125.64.16.10 return(Global_Fun.GetConnectionString("10Connection")); } else if (entry == "2") { // 125.64.16.14 return(Global_Fun.GetConnectionString("14Connection")); } else if (entry == "3") { return(Global_Fun.GetConnectionString("37Connection")); } else if (entry == "4") { return(Global_Fun.GetConnectionString("19Connection")); } else if (entry == "6") { return(Global_Fun.GetConnectionString("36Connection")); } else if (entry == "7") { return(Global_Fun.GetConnectionString("ConnectionDX4")); } else if (entry == "99") { // 125.64.16.12 return(Global_Fun.GetConnectionString("12Connection")); } return(null); }
//获得业务引擎数据库连接字符串 public static void GetHmWyglConnection() { Bll_Tb_System_Corp Bll = new Bll_Tb_System_Corp(); DataTable dTable = Bll.GetList("CorpId='" + Global_Var.CorpId.ToString() + "' AND ISNULL(IsDelete,0)=0").Tables[0]; if (dTable.Rows.Count > 0) { DataRow DRow = dTable.Rows[0]; Global_Var.LoginCorpID = DRow["CorpID"].ToString(); Global_Var.CorpName = DRow["CorpName"].ToString(); Global_Var.LoginRegMode = DRow["RegMode"].ToString(); Global_Var.SysVersion = DRow["SysVersion"].ToString(); Global_Var.ERPDatabaseName = DRow["DBName"].ToString(); PubConstant.hmWyglConnectionString = Global_Fun.BuildLoginConnectSql(DRow["DBServer"].ToString(), DRow["DBName"].ToString(), DRow["DBUser"].ToString(), DRow["DBPwd"].ToString()); } }