转自:http://www.cnblogs.com/weixing/p/5674078.html

References required:

  • HttpContextWrapper - System.Web.dll
  • RemoteEndpointMessageProperty - System.ServiceModel.dll
  • OwinContext - Microsoft.Owin.dll (you will have it already if you use Owin package)
  1. using System.Net.Http;
  2.  
  3. public static class HttpRequestMessageExtensions
  4. {
  5. private const string HttpContext = "MS_HttpContext";
  6. private const string RemoteEndpointMessage =
  7. "System.ServiceModel.Channels.RemoteEndpointMessageProperty";
  8. private const string OwinContext = "MS_OwinContext";
  9.  
  10. public static string GetClientIpAddress(this HttpRequestMessage request)
  11. {
  12. // Web-hosting. Needs reference to System.Web.dll
  13. if (request.Properties.ContainsKey(HttpContext))
  14. {
  15. dynamic ctx = request.Properties[HttpContext];
  16. if (ctx != null)
  17. {
  18. return ctx.Request.UserHostAddress;
  19. }
  20. }
  21.  
  22. // Self-hosting. Needs reference to System.ServiceModel.dll.
  23. if (request.Properties.ContainsKey(RemoteEndpointMessage))
  24. {
  25. dynamic remoteEndpoint = request.Properties[RemoteEndpointMessage];
  26. if (remoteEndpoint != null)
  27. {
  28. return remoteEndpoint.Address;
  29. }
  30. }
  31.  
  32. // Self-hosting using Owin. Needs reference to Microsoft.Owin.dll.
  33. if (request.Properties.ContainsKey(OwinContext))
  34. {
  35. dynamic owinContext = request.Properties[OwinContext];
  36. if (owinContext != null)
  37. {
  38. return owinContext.Request.RemoteIpAddress;
  39. }
  40. }
  41.  
  42. return null;
  43. }
  44. }

  

  1. using System.Net.Http;
  2.  
  3. public static class HttpRequestMessageExtensions
  4. {
  5. private const string HttpContext = "MS_HttpContext";
  6. private const string RemoteEndpointMessage =
  7. "System.ServiceModel.Channels.RemoteEndpointMessageProperty";
  8. private const string OwinContext = "MS_OwinContext";
  9.  
  10. public static string GetClientIpAddress(this HttpRequestMessage request)
  11. {
  12. // Web-hosting. Needs reference to System.Web.dll
  13. if (request.Properties.ContainsKey(HttpContext))
  14. {
  15. dynamic ctx = request.Properties[HttpContext];
  16. if (ctx != null)
  17. {
  18. return ctx.Request.UserHostAddress;
  19. }
  20. }
  21.  
  22. // Self-hosting. Needs reference to System.ServiceModel.dll.
  23. if (request.Properties.ContainsKey(RemoteEndpointMessage))
  24. {
  25. dynamic remoteEndpoint = request.Properties[RemoteEndpointMessage];
  26. if (remoteEndpoint != null)
  27. {
  28. return remoteEndpoint.Address;
  29. }
  30. }
  31.  
  32. // Self-hosting using Owin. Needs reference to Microsoft.Owin.dll.
  33. if (request.Properties.ContainsKey(OwinContext))
  34. {
  35. dynamic owinContext = request.Properties[OwinContext];
  36. if (owinContext != null)
  37. {
  38. return owinContext.Request.RemoteIpAddress;
  39. }
  40. }
  41.  
  42. return null;
  43. }
  44. }

第二种:

  1. ((System.Web.HttpContextWrapper)Request.Properties["MS_HttpContext"]).Request.UserHostAddress;
  1. public class CheckIP
  2. {
  3. #region 获取浏览器版本号
  4.  
  5. /// <summary>
  6. /// 获取浏览器版本号
  7. /// </summary>
  8. /// <returns></returns>
  9. public static string GetBrowser()
  10. {
  11. HttpBrowserCapabilities bc = HttpContext.Current.Request.Browser;
  12. return bc.Browser + bc.Version;
  13. }
  14.  
  15. #endregion
  16.  
  17. #region 获取操作系统版本号
  18.  
  19. /// <summary>
  20. /// 获取操作系统版本号
  21. /// </summary>
  22. /// <returns></returns>
  23. public static string GetOSVersion()
  24. {
  25. //UserAgent
  26. var userAgent = HttpContext.Current.Request.ServerVariables["HTTP_USER_AGENT"];
  27.  
  28. var osVersion = "未知";
  29.  
  30. if (userAgent.Contains("NT 6.1"))
  31. {
  32. osVersion = "Windows 7";
  33. }
  34. else if (userAgent.Contains("NT 6.0"))
  35. {
  36. osVersion = "Windows Vista/Server 2008";
  37. }
  38. else if (userAgent.Contains("NT 5.2"))
  39. {
  40. osVersion = "Windows Server 2003";
  41. }
  42. else if (userAgent.Contains("NT 5.1"))
  43. {
  44. osVersion = "Windows XP";
  45. }
  46. else if (userAgent.Contains("NT 5"))
  47. {
  48. osVersion = "Windows 2000";
  49. }
  50. else if (userAgent.Contains("NT 4"))
  51. {
  52. osVersion = "Windows NT4";
  53. }
  54. else if (userAgent.Contains("Me"))
  55. {
  56. osVersion = "Windows Me";
  57. }
  58. else if (userAgent.Contains(""))
  59. {
  60. osVersion = "Windows 98";
  61. }
  62. else if (userAgent.Contains(""))
  63. {
  64. osVersion = "Windows 95";
  65. }
  66. else if (userAgent.Contains("Mac"))
  67. {
  68. osVersion = "Mac";
  69. }
  70. else if (userAgent.Contains("Unix"))
  71. {
  72. osVersion = "UNIX";
  73. }
  74. else if (userAgent.Contains("Linux"))
  75. {
  76. osVersion = "Linux";
  77. }
  78. else if (userAgent.Contains("SunOS"))
  79. {
  80. osVersion = "SunOS";
  81. }
  82. return osVersion;
  83. }
  84. #endregion
  85.  
  86. #region 获取客户端IP地址
  87.  
  88. /// <summary>
  89. /// 获取客户端IP地址
  90. /// </summary>
  91. /// <returns></returns>
  92. public static string GetIP()
  93. {
  94. string result = HttpContext.Current.Request.ServerVariables["HTTP_X_FORWARDED_FOR"];
  95. if (string.IsNullOrEmpty(result))
  96. {
  97. result = HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"];
  98. }
  99. if (string.IsNullOrEmpty(result))
  100. {
  101. result = HttpContext.Current.Request.UserHostAddress;
  102. }
  103. if (string.IsNullOrEmpty(result))
  104. {
  105. return "0.0.0.0";
  106. }
  107. return result;
  108. }
  109.  
  110. #endregion
  111.  
  112. #region 取客户端真实IP
  113.  
  114. /// <summary>
  115. /// 取得客户端真实IP。如果有代理则取第一个非内网地址
  116. /// </summary>
  117. public static string GetIPAddress
  118. {
  119. get
  120. {
  121. var result = HttpContext.Current.Request.ServerVariables["HTTP_X_FORWARDED_FOR"];
  122. if (!string.IsNullOrEmpty(result))
  123. {
  124. //可能有代理
  125. if (result.IndexOf(".") == -) //没有“.”肯定是非IPv4格式
  126. result = null;
  127. else
  128. {
  129. if (result.IndexOf(",") != -)
  130. {
  131. //有“,”,估计多个代理。取第一个不是内网的IP。
  132. result = result.Replace(" ", "").Replace("'", "");
  133. string[] temparyip = result.Split(",;".ToCharArray());
  134. for (int i = ; i < temparyip.Length; i++)
  135. {
  136. if (IsIPAddress(temparyip[i])
  137. && temparyip[i].Substring(, ) != "10."
  138. && temparyip[i].Substring(, ) != "192.168"
  139. && temparyip[i].Substring(, ) != "172.16.")
  140. {
  141. return temparyip[i]; //找到不是内网的地址
  142. }
  143. }
  144. }
  145. else if (IsIPAddress(result)) //代理即是IP格式
  146. return result;
  147. else
  148. result = null; //代理中的内容 非IP,取IP
  149. }
  150.  
  151. }
  152.  
  153. string IpAddress = (HttpContext.Current.Request.ServerVariables["HTTP_X_FORWARDED_FOR"] != null && HttpContext.Current.Request.ServerVariables["HTTP_X_FORWARDED_FOR"] != String.Empty) ? HttpContext.Current.Request.ServerVariables["HTTP_X_FORWARDED_FOR"] : HttpContext.Current.Request.ServerVariables["HTTP_X_REAL_IP"];
  154.  
  155. if (string.IsNullOrEmpty(result))
  156. result = HttpContext.Current.Request.ServerVariables["HTTP_X_REAL_IP"];
  157.  
  158. if (string.IsNullOrEmpty(result))
  159. result = HttpContext.Current.Request.UserHostAddress;
  160.  
  161. return result;
  162. }
  163. }
  164.  
  165. #endregion
  166.  
  167. #region 判断是否是IP格式
  168.  
  169. /// <summary>
  170. /// 判断是否是IP地址格式 0.0.0.0
  171. /// </summary>
  172. /// <param name="str1">待判断的IP地址</param>
  173. /// <returns>true or false</returns>
  174. public static bool IsIPAddress(string str1)
  175. {
  176. if (string.IsNullOrEmpty(str1) || str1.Length < || str1.Length > ) return false;
  177.  
  178. const string regFormat = @"^d{1,3}[.]d{1,3}[.]d{1,3}[.]d{1,3}$";
  179.  
  180. var regex = new Regex(regFormat, RegexOptions.IgnoreCase);
  181. return regex.IsMatch(str1);
  182. }
  183.  
  184. #endregion
  185.  
  186. #region 获取公网IP
  187. /// <summary>
  188. /// 获取公网IP
  189. /// </summary>
  190. /// <returns></returns>
  191. public static string GetNetIP()
  192. {
  193. string tempIP = "";
  194. try
  195. {
  196. System.Net.WebRequest wr = System.Net.WebRequest.Create("http://city.ip138.com/ip2city.asp");
  197. System.IO.Stream s = wr.GetResponse().GetResponseStream();
  198. System.IO.StreamReader sr = new System.IO.StreamReader(s, System.Text.Encoding.GetEncoding("gb2312"));
  199. string all = sr.ReadToEnd(); //读取网站的数据
  200.  
  201. int start = all.IndexOf("[") + ;
  202. int end = all.IndexOf("]", start);
  203. tempIP = all.Substring(start, end - start);
  204. sr.Close();
  205. s.Close();
  206. }
  207. catch
  208. {
  209. if (System.Net.Dns.GetHostEntry(System.Net.Dns.GetHostName()).AddressList.Length > )
  210. tempIP = System.Net.Dns.GetHostEntry(System.Net.Dns.GetHostName()).AddressList[].ToString();
  211. if (string.IsNullOrEmpty(tempIP))
  212. return GetIP();
  213. }
  214. return tempIP;
  215. }
  216. #endregion
  217.  
  218. asp.net 获取客户端浏览器,ip地址,操作系统信息
  1. public class CheckIP
  2. {
  3. #region 获取浏览器版本号
  4.  
  5. /// <summary>
  6. /// 获取浏览器版本号
  7. /// </summary>
  8. /// <returns></returns>
  9. public static string GetBrowser()
  10. {
  11. HttpBrowserCapabilities bc = HttpContext.Current.Request.Browser;
  12. return bc.Browser + bc.Version;
  13. }
  14.  
  15. #endregion
  16.  
  17. #region 获取操作系统版本号
  18.  
  19. /// <summary>
  20. /// 获取操作系统版本号
  21. /// </summary>
  22. /// <returns></returns>
  23. public static string GetOSVersion()
  24. {
  25. //UserAgent
  26. var userAgent = HttpContext.Current.Request.ServerVariables["HTTP_USER_AGENT"];
  27.  
  28. var osVersion = "未知";
  29.  
  30. if (userAgent.Contains("NT 6.1"))
  31. {
  32. osVersion = "Windows 7";
  33. }
  34. else if (userAgent.Contains("NT 6.0"))
  35. {
  36. osVersion = "Windows Vista/Server 2008";
  37. }
  38. else if (userAgent.Contains("NT 5.2"))
  39. {
  40. osVersion = "Windows Server 2003";
  41. }
  42. else if (userAgent.Contains("NT 5.1"))
  43. {
  44. osVersion = "Windows XP";
  45. }
  46. else if (userAgent.Contains("NT 5"))
  47. {
  48. osVersion = "Windows 2000";
  49. }
  50. else if (userAgent.Contains("NT 4"))
  51. {
  52. osVersion = "Windows NT4";
  53. }
  54. else if (userAgent.Contains("Me"))
  55. {
  56. osVersion = "Windows Me";
  57. }
  58. else if (userAgent.Contains("98"))
  59. {
  60. osVersion = "Windows 98";
  61. }
  62. else if (userAgent.Contains("95"))
  63. {
  64. osVersion = "Windows 95";
  65. }
  66. else if (userAgent.Contains("Mac"))
  67. {
  68. osVersion = "Mac";
  69. }
  70. else if (userAgent.Contains("Unix"))
  71. {
  72. osVersion = "UNIX";
  73. }
  74. else if (userAgent.Contains("Linux"))
  75. {
  76. osVersion = "Linux";
  77. }
  78. else if (userAgent.Contains("SunOS"))
  79. {
  80. osVersion = "SunOS";
  81. }
  82. return osVersion;
  83. }
  84. #endregion
  85.  
  86. #region 获取客户端IP地址
  87.  
  88. /// <summary>
  89. /// 获取客户端IP地址
  90. /// </summary>
  91. /// <returns></returns>
  92. public static string GetIP()
  93. {
  94. string result = HttpContext.Current.Request.ServerVariables["HTTP_X_FORWARDED_FOR"];
  95. if (string.IsNullOrEmpty(result))
  96. {
  97. result = HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"];
  98. }
  99. if (string.IsNullOrEmpty(result))
  100. {
  101. result = HttpContext.Current.Request.UserHostAddress;
  102. }
  103. if (string.IsNullOrEmpty(result))
  104. {
  105. return "0.0.0.0";
  106. }
  107. return result;
  108. }
  109.  
  110. #endregion
  111.  
  112. #region 取客户端真实IP
  113.  
  114. /// <summary>
  115. /// 取得客户端真实IP。如果有代理则取第一个非内网地址
  116. /// </summary>
  117. public static string GetIPAddress
  118. {
  119. get
  120. {
  121. var result = HttpContext.Current.Request.ServerVariables["HTTP_X_FORWARDED_FOR"];
  122. if (!string.IsNullOrEmpty(result))
  123. {
  124. //可能有代理
  125. if (result.IndexOf(".") == -1) //没有“.”肯定是非IPv4格式
  126. result = null;
  127. else
  128. {
  129. if (result.IndexOf(",") != -1)
  130. {
  131. //有“,”,估计多个代理。取第一个不是内网的IP。
  132. result = result.Replace(" ", "").Replace("'", "");
  133. string[] temparyip = result.Split(",;".ToCharArray());
  134. for (int i = 0; i < temparyip.Length; i++)
  135. {
  136. if (IsIPAddress(temparyip[i])
  137. && temparyip[i].Substring(0, 3) != "10."
  138. && temparyip[i].Substring(0, 7) != "192.168"
  139. && temparyip[i].Substring(0, 7) != "172.16.")
  140. {
  141. return temparyip[i]; //找到不是内网的地址
  142. }
  143. }
  144. }
  145. else if (IsIPAddress(result)) //代理即是IP格式
  146. return result;
  147. else
  148. result = null; //代理中的内容 非IP,取IP
  149. }
  150.  
  151. }
  152.  
  153. string IpAddress = (HttpContext.Current.Request.ServerVariables["HTTP_X_FORWARDED_FOR"] != null && HttpContext.Current.Request.ServerVariables["HTTP_X_FORWARDED_FOR"] != String.Empty) ? HttpContext.Current.Request.ServerVariables["HTTP_X_FORWARDED_FOR"] : HttpContext.Current.Request.ServerVariables["HTTP_X_REAL_IP"];
  154.  
  155. if (string.IsNullOrEmpty(result))
  156. result = HttpContext.Current.Request.ServerVariables["HTTP_X_REAL_IP"];
  157.  
  158. if (string.IsNullOrEmpty(result))
  159. result = HttpContext.Current.Request.UserHostAddress;
  160.  
  161. return result;
  162. }
  163. }
  164.  
  165. #endregion
  166.  
  167. #region 判断是否是IP格式
  168.  
  169. /// <summary>
  170. /// 判断是否是IP地址格式 0.0.0.0
  171. /// </summary>
  172. /// <param name="str1">待判断的IP地址</param>
  173. /// <returns>true or false</returns>
  174. public static bool IsIPAddress(string str1)
  175. {
  176. if (string.IsNullOrEmpty(str1) || str1.Length < 7 || str1.Length > 15) return false;
  177.  
  178. const string regFormat = @"^d{1,3}[.]d{1,3}[.]d{1,3}[.]d{1,3}$";
  179.  
  180. var regex = new Regex(regFormat, RegexOptions.IgnoreCase);
  181. return regex.IsMatch(str1);
  182. }
  183.  
  184. #endregion
  185.  
  186. #region 获取公网IP
  187. /// <summary>
  188. /// 获取公网IP
  189. /// </summary>
  190. /// <returns></returns>
  191. public static string GetNetIP()
  192. {
  193. string tempIP = "";
  194. try
  195. {
  196. System.Net.WebRequest wr = System.Net.WebRequest.Create("http://city.ip138.com/ip2city.asp");
  197. System.IO.Stream s = wr.GetResponse().GetResponseStream();
  198. System.IO.StreamReader sr = new System.IO.StreamReader(s, System.Text.Encoding.GetEncoding("gb2312"));
  199. string all = sr.ReadToEnd(); //读取网站的数据
  200.  
  201. int start = all.IndexOf("[") + 1;
  202. int end = all.IndexOf("]", start);
  203. tempIP = all.Substring(start, end - start);
  204. sr.Close();
  205. s.Close();
  206. }
  207. catch
  208. {
  209. if (System.Net.Dns.GetHostEntry(System.Net.Dns.GetHostName()).AddressList.Length > 1)
  210. tempIP = System.Net.Dns.GetHostEntry(System.Net.Dns.GetHostName()).AddressList[1].ToString();
  211. if (string.IsNullOrEmpty(tempIP))
  212. return GetIP();
  213. }
  214. return tempIP;
  215. }
  216. #endregion

/// <summary>
/// 获取客户端IP地址(无视代理)
/// </summary>
/// <returns>若失败则返回回送地址</returns>
public static string GetHostAddress()
{
string userHostAddress = HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"];
if (string.IsNullOrEmpty(userHostAddress))
{
if (System.Web.HttpContext.Current.Request.ServerVariables["HTTP_VIA"] != null)
userHostAddress = HttpContext.Current.Request.ServerVariables["HTTP_X_FORWARDED_FOR"].ToString().Split(',')[0].Trim();
}
if (string.IsNullOrEmpty(userHostAddress))
{
userHostAddress = HttpContext.Current.Request.UserHostAddress;
}

//最后判断获取是否成功,并检查IP地址的格式(检查其格式非常重要)
if (!string.IsNullOrEmpty(userHostAddress) && IsIP(userHostAddress))
{
return userHostAddress;
}
return "127.0.0.1";
}

/// <summary>
/// 检查IP地址格式
/// </summary>
/// <param name="ip"></param>
/// <returns></returns>
public static bool IsIP(string ip)
{
return System.Text.RegularExpressions.Regex.IsMatch(ip, @"^((2[0-4]\d|25[0-5]|[01]?\d\d?)\.){3}(2[0-4]\d|25[0-5]|[01]?\d\d?)$");
}

获取客户端IP地址(无视代理)

  1. /// <summary>
  2. /// 获取客户端IP地址(无视代理)
  3. /// </summary>
  4. /// <returns>若失败则返回回送地址</returns>
  5. public static string GetHostAddress()
  6. {
  7. string userHostAddress = HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"];
  8. if (string.IsNullOrEmpty(userHostAddress))
  9. {
  10. if (System.Web.HttpContext.Current.Request.ServerVariables["HTTP_VIA"] != null)
  11. userHostAddress = HttpContext.Current.Request.ServerVariables["HTTP_X_FORWARDED_FOR"].ToString().Split(',')[0].Trim();
  12. }
  13. if (string.IsNullOrEmpty(userHostAddress))
  14. {
  15. userHostAddress = HttpContext.Current.Request.UserHostAddress;
  16. }
  17.  
  18. //最后判断获取是否成功,并检查IP地址的格式(检查其格式非常重要)
  19. if (!string.IsNullOrEmpty(userHostAddress) && IsIP(userHostAddress))
  20. {
  21. return userHostAddress;
  22. }
  23. return "127.0.0.1";
  24. }
  25.  
  26. /// <summary>
  27. /// 检查IP地址格式
  28. /// </summary>
  29. /// <param name="ip"></param>
  30. /// <returns></returns>
  31. public static bool IsIP(string ip)
  32. {
  33. return System.Text.RegularExpressions.Regex.IsMatch(ip, @"^((2[0-4]\d|25[0-5]|[01]?\d\d?)\.){3}(2[0-4]\d|25[0-5]|[01]?\d\d?)$");
  34. }

C# WebApi 获取客户端ip地址的更多相关文章

  1. .net core webapi 后台获取客户端ip地址

    Asp.Net Core2.0获取客户IP地址,及解决发布到Ubuntu服务器获取不到正确IP解决办法   1.获取客户端IP地址实现方法(扩展类) 1 using Microsoft.AspNetC ...

  2. 在Thinkphp3.2.3框架下实现自动获取客户端IP地址的get_client_ip()函数

    在Thinkphp框架下使用get_client_ip()函数获取客户端IP地址十分方便: 一行代码便可以实现:$ip = get_client_ip(); 但当我们测试时会遇到后台获取的IP地址显示 ...

  3. JAVA获取客户端IP地址

    在JSP里,获取客户端的IP地址的方法是:request.getRemoteAddr(),这种方法在大部分情况下都是有效的.但是在通过了Apache,Squid等反向代理软件就不能获取到客户端的真实I ...

  4. (转)【ASP.NET开发】获取客户端IP地址 via C#

    [ASP.NET开发]获取客户端IP地址 via C# 说明:本文中的内容是我综合博客园上的博文和MSDN讨论区的资料,再通过自己的实际测试而得来,属于自己原创的内容说实话很少,写这一篇是为了记录自己 ...

  5. php获取客户端ip地址

    本文介绍一个,php获取客户端的IP地址的实例代码,有需要的朋友参考下吧. 获取客户端IP地址的代码,如下: 复制代码代码示例: <?php//取得客户端IP的函数function get_cl ...

  6. 获取客户端IP地址 via C#

    获取客户端IP地址 via C# 说明:本文中的内容是我综合博客园上的博文和MSDN讨论区的资料,再通过自己的实际测试而得来,属于自己原创的内容说实话很少,写这一篇是为了记录自己在项目中做过的事情,同 ...

  7. thinkphp 获取客户端ip地址方法

    /** * 获取客户端IP地址 * @param integer $type 返回类型 0 返回IP地址 1 返回IPV4地址数字 * @param boolean $adv 是否进行高级模式获取(有 ...

  8. 获取客户端IP地址定位城市信息

    获取客户端IP地址定位城市信息 1.首先获取客户端的IP地址 function getIPaddress(){ $IPaddress=''; if (isset($_SERVER)){ if (iss ...

  9. Tp框架获取客户端IP地址

    /** * 获取客户端IP地址 * @param integer $type 返回类型 0 返回IP地址 1 返回IPV4地址数字 * @return mixed */ function get_cl ...

随机推荐

  1. hihoCoder编程练习赛70

    题目1 : 数位翻转 时间限制:20000ms 单点时限:1000ms 内存限制:256MB 描述 给定一个数 n,你可以进行若干次操作,每次操作可以翻转 n 的二进制表示下的某一位,即将 0 变成 ...

  2. navicate 远程无法链接linux上mysql数据库问题

    1. 先确认阿里云是否放开了3306权限 (开启阿里云服务器端口) 2. 连接linux,登录数据库:mysql -uroot -p 修改root用户远程登录权限: 想myuser使用mypasswo ...

  3. cf55D. Beautiful numbers(数位dp)

    题意 题目链接 Sol 看到这种题就不难想到是数位dp了. 一个很显然的性质是一个数若能整除所有位数上的数,则一定能整除他们的lcm. 根据这个条件我们不难看出我们只需要记录每个数对所有数的lcm(也 ...

  4. SAP MM PR中的Fixed ID字段与MD04里PR单据号后的星号

    SAP MM PR中的Fixed ID字段与MD04里PR单据号后的星号 如下图是我手工使用ME51N 创建的一个采购申请单据, ​ MD04去看这个PR, ​ 这个PR号码后面有一个*号,代表它是一 ...

  5. 17.Odoo产品分析 (二) – 商业板块(10) – 电子商务(1)

    查看Odoo产品分析系列--目录 安装电子商务模块 1. 主页 点击"商店"菜单:  2. 添加商品 在odoo中,你不用进入"销售"模块,再进入产品列表添加产 ...

  6. AWS专线服务总结和疑问

    1.AWS专线服务的入口, 从介绍页上可以看到,有如下功能: (1)专线可以连接AWS云主机和传统的数据中心或者分支机构. (2)专线可以连接AWS云主机和托管区的主机. 连接要素: (1)需要使用V ...

  7. 小程序实践(一):主页tab选项实现

    官方文档 效果图: 实现底部Tab选项,只需要在项目根目录下的app.json下修改 如图: ----------------------------------------------------- ...

  8. 我喜欢 Google Flutter

    在 Google I/O ’17 上,Google 向我们介绍了 Flutter —— 一款新的用于创建移动应用的开源库. 正如你所想的那样,Flutter 是能够帮助创建拥有漂亮 UI 界面的跨平台 ...

  9. 章节四、2-Switch语句

    package introduction5; public class SwitchDemo { //switch用于固定值的判断,如星期.人的性别 //if用于判断区间.范围,能够用switch进行 ...

  10. SQL Server的优化器会缓存标量子查询结果集吗

    在这篇博客"ORACLE当中自定义函数性优化浅析"中,我们介绍了通过标量子查询缓存来优化函数性能: 标量子查询缓存(scalar subquery caching)会通过缓存结果减 ...