Beispiel #1
0
        public static void SetBaseWebReference(System.Web.Services.Protocols.SoapHttpClientProtocol objservice)
        {
            string baseUrl = CommonData.GetInstance().GetWebReferenceUrl();

            //MessageBox.Show(baseUrl);
            //MessageBox.Show(System.IO.Directory.GetCurrentDirectory());
            objservice.Url = baseUrl + objservice.Url.Substring(objservice.Url.LastIndexOf('/'));
            //MessageBox.Show(objservice.Url);
        }
Beispiel #2
0
 /// <summary>
 /// 获取Web端Log输出路径
 /// </summary>
 /// <returns>Log输出路径</returns>
 private string GetWebLogFilePathName()
 {
     try
     {
         string logPath = "log/";
         logPath = System.IO.Path.Combine(CommonData.GetInstance().getWebLogPath(), logPath);
         if (Directory.Exists(logPath) == false)
         {
             Directory.CreateDirectory(logPath);
         }
         string logFileName = System.DateTime.Now.ToString("yyyMMdd") + ".LOG";
         return(Path.Combine(logPath, logFileName));
     }
     catch (System.Exception e)
     {
         e.ToString();
         return("");
     }
 }
Beispiel #3
0
        public static string GetConfigSql(string nodePathName)
        {
            try
            {
                //配置文件定位
                string configFile = Path.Combine(
                    CommonData.GetInstance().ConfigPath, "SqlConfig.xml");
                //配置内容的读取
                ArrayList configValueLst = null;
                configValueLst = GetXmlString(
                    configFile, "Config/ClientPara/" + nodePathName + "/sql");

                //定义内容的换行的处理
                string configValue = (string)configValueLst[0];
                //
                return(configValue);
            }
            catch (System.Exception e)
            {
                return("");
            }
        }
Beispiel #4
0
        public static void SetBaseWebReference(string referenceType, System.Web.Services.Protocols.SoapHttpClientProtocol objservice)
        {
            string baseUrl = CommonData.GetInstance().GetWebReferenceUrl(referenceType);

            objservice.Url = baseUrl + objservice.Url.Substring(objservice.Url.LastIndexOf('/'));
        }