mirror of
https://git.oceanpay.cc/danial/kami_itunes_june.git
synced 2025-12-18 22:31:24 +00:00
- 在.settings.local.json中添加dotnet clean命令权限 - 更新项目文件以启用不安全的二进制序列化和禁用平台兼容性警告 - 配置调试和发布模式的编译常量及优化选项 - 在解决方案文件中升级Visual Studio版本并添加多平台配置 - 移除FormLogin构造函数中的MessageBox调试代码 - 为过时的WebRequest、WebClient和ServicePointManager API添加编译警告抑制 - 简化异常处理逻辑并在Program.cs中改进启动流程 - 移除多个未使用的局部变量声明 - 添加launchSettings.json以支持开发环境配置 - 在表单构造函数中初始化components容器 - 优化网络请求超时设置并改善错误处理机制
610 lines
22 KiB
C#
610 lines
22 KiB
C#
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using System.Data;
|
|
using System.Globalization;
|
|
using System.IO;
|
|
using System.IO.Compression;
|
|
using System.Net;
|
|
using System.Text;
|
|
using AppleBatch_June.Login;
|
|
|
|
namespace AppleBatch_June
|
|
{
|
|
public class AppleItunesDoLogin
|
|
{
|
|
private DataTable dataTable_0;
|
|
|
|
public iTunesUserInfo Login(string strAppleId, string strPassword, string strMachineName, bool fag, string usrage, string siv, IWebProxy webProxy = null)
|
|
{
|
|
iTunesUserInfo iTunesUserInfo = new iTunesUserInfo();
|
|
iTunesUserInfo.Headers["User-Agent"] = usrage;
|
|
iTunesUserInfo.UserName = strAppleId;
|
|
iTunesUserInfo.Password = strPassword;
|
|
iTunesUserInfo.MachineName = strMachineName;
|
|
iTunesUserInfo.siv = siv;
|
|
if (string.IsNullOrEmpty(iTunesUserInfo.StoredDescrption))
|
|
{
|
|
iTunesUserInfo.StoredDescrption = "143465-19,17";
|
|
}
|
|
Random random = new Random();
|
|
iTunesUserInfo.ServerId = random.Next(25, 50).ToString();
|
|
iTunesUserInfo.Guid = strMachineName;
|
|
if (iTunesUserInfo.Area.Length == 0)
|
|
{
|
|
iTunesUserInfo.Area = GetAreaByDescription(iTunesUserInfo.StoredDescrption);
|
|
}
|
|
if (iTunesUserInfo.Area.Length == 0)
|
|
{
|
|
iTunesUserInfo.Area = "CN";
|
|
}
|
|
iTunesUserInfo.Boundary = Guid.NewGuid().ToString("N").ToUpper(CultureInfo.InvariantCulture);
|
|
iTunesUserInfo.State = LoginApp(iTunesUserInfo, usrage, webProxy);
|
|
iTunesUserInfo.PasswordToken = GetKeyValue("<key>passwordToken</key>", "<string>", "</string>", iTunesUserInfo.PlistContent);
|
|
iTunesUserInfo.Dsid = GetKeyValue("<key>dsPersonId</key>", "<string>", "</string>", iTunesUserInfo.PlistContent);
|
|
iTunesUserInfo.Credit = GetKeyValue("<key>creditDisplay</key>", "<string>", "</string>", iTunesUserInfo.PlistContent);
|
|
iTunesUserInfo.Balance = GetKeyValue("<key>creditDisplayInternal</key>", "<string>", "</string>", iTunesUserInfo.PlistContent);
|
|
return iTunesUserInfo;
|
|
}
|
|
|
|
private iTunesDownloadErrorState LoginApp(iTunesUserInfo user, string usrage, IWebProxy webProxy)
|
|
{
|
|
iTunesDownloadErrorState result = iTunesDownloadErrorState.Succeed;
|
|
Dictionary<object, object> dictionary = new Dictionary<object, object>();
|
|
dictionary.Add("appleId", user.UserName);
|
|
dictionary.Add("attempt", "1");
|
|
dictionary.Add("createSession", true);
|
|
dictionary.Add("guid", user.Guid);
|
|
dictionary.Add("password", user.Password.Trim());
|
|
dictionary.Add("why", "purchase");
|
|
string s = CreatePlistString(dictionary);
|
|
do
|
|
{
|
|
user.IsAreaChanged = false;
|
|
DateTime now = DateTime.Now;
|
|
while (DateTime.Now.Subtract(now).TotalSeconds < 120.0)
|
|
{
|
|
string text = "https://p" + user.ServerId + "-buy.itunes.apple.com/WebObjects/MZFinance.woa/wa/authenticate?Pod=" + user.ServerId + "&PRH=" + user.ServerId;
|
|
_ = "https://itunes.apple.com/WebObjects/MZStore.woa/wa/viewGrouping?cc=" + GetAreaByDescription(user.StoredDescrption) + "&mt=8";
|
|
byte[] bytes = Encoding.UTF8.GetBytes(s);
|
|
string empty = string.Empty;
|
|
HttpWebRequest httpWebRequest = SetiTunesHtppHeaders(text, bytes, text, user.StoredDescrption, empty, user, usrage, webProxy);
|
|
httpWebRequest.ContentType = "application/x-apple-plist";
|
|
string string_ = "";
|
|
string text2 = GetiTunesHtpp(httpWebRequest, ref string_, user);
|
|
if (string.IsNullOrEmpty(text2) || !(string_ == ""))
|
|
{
|
|
user.ServerId = GetServerId(string_);
|
|
httpWebRequest = null;
|
|
continue;
|
|
}
|
|
if (text2 != string.Empty)
|
|
{
|
|
user.PlistContent = text2;
|
|
}
|
|
httpWebRequest = null;
|
|
break;
|
|
}
|
|
}
|
|
while (user.IsAreaChanged && user.PlistContent == string.Empty);
|
|
if (user.PlistContent.Length == 0)
|
|
{
|
|
result = iTunesDownloadErrorState.WebCannotAnalyse;
|
|
}
|
|
else
|
|
{
|
|
string keyValue = GetKeyValue("<key>failureType</key>", "<string>", "</string>", user.PlistContent);
|
|
string keyValue2 = GetKeyValue("<key>customerMessage</key>", "<string>", "</string>", user.PlistContent);
|
|
if (GetKeyValue("<key>dialogId</key>", "<string>", "</string>", user.PlistContent) == "MZFinance.DisabledAndFraudLocked")
|
|
{
|
|
return iTunesDownloadErrorState.BeenLocked;
|
|
}
|
|
if (keyValue2.Length <= 0 && keyValue.Length <= 0)
|
|
{
|
|
if (keyValue2.Length > 0)
|
|
{
|
|
result = (keyValue2.Contains("https://iforgot.apple.com") ? iTunesDownloadErrorState.LoginiTunesDisable : iTunesDownloadErrorState.UnKnow);
|
|
}
|
|
else if (keyValue.Length == 0 && keyValue2.Length == 0)
|
|
{
|
|
string keyValue3 = GetKeyValue("<key>message</key>", "<string>", "</string>", user.PlistContent);
|
|
if (keyValue3.Length > 0 && keyValue3.StartsWith("This Apple ID is only valid for purchases"))
|
|
{
|
|
result = iTunesDownloadErrorState.Succeed;
|
|
}
|
|
}
|
|
}
|
|
else
|
|
{
|
|
result = ((keyValue == "-5000") ? iTunesDownloadErrorState.LoginException : iTunesDownloadErrorState.UnKnow);
|
|
}
|
|
}
|
|
return result;
|
|
}
|
|
|
|
private HttpWebRequest SetiTunesHtppHeaders(string string_3, byte[] byte_2, string string_4, string string_5, string string_6, iTunesUserInfo user, string usrage, IWebProxy webProxy = null)
|
|
{
|
|
#pragma warning disable SYSLIB0014 // WebRequest is obsolete
|
|
HttpWebRequest httpWebRequest = WebRequest.Create(new Uri(string_3)) as HttpWebRequest;
|
|
#pragma warning restore SYSLIB0014 // WebRequest is obsolete
|
|
httpWebRequest.Method = "POST";
|
|
httpWebRequest.Headers["User-Agent"] = usrage;
|
|
if (string_4.Length > 0)
|
|
{
|
|
httpWebRequest.Referer = string_4;
|
|
}
|
|
httpWebRequest.AllowAutoRedirect = true;
|
|
httpWebRequest.ServicePoint.Expect100Continue = false;
|
|
httpWebRequest.AllowAutoRedirect = false;
|
|
httpWebRequest.AllowWriteStreamBuffering = true;
|
|
httpWebRequest.KeepAlive = true;
|
|
if (webProxy != null)
|
|
{
|
|
httpWebRequest.Proxy = webProxy;
|
|
}
|
|
httpWebRequest.Timeout = 60000;
|
|
if (user.PcookieContainer.Count <= 0)
|
|
{
|
|
httpWebRequest.Headers.Add("Cookie", "mzf_in=072381; itspod=" + user.ServerId + "; s_vi=" + user.siv + "; itsMetricsR=Genre-CN-Mobile%20Software%20Applications-29099@@Mobile%20Software%20Applications-main@@@@; Pod=" + user.ServerId + "; s_vnum_n2_us=0%7C1");
|
|
}
|
|
else
|
|
{
|
|
httpWebRequest.CookieContainer = user.PcookieContainer;
|
|
}
|
|
addLoginhttp(httpWebRequest, user);
|
|
if (!string.IsNullOrEmpty(string_6))
|
|
{
|
|
httpWebRequest.Headers.Add("X-Apple-ActionSignature", string_6);
|
|
}
|
|
using Stream stream = httpWebRequest.GetRequestStream();
|
|
stream.Write(byte_2, 0, byte_2.Length);
|
|
return httpWebRequest;
|
|
}
|
|
|
|
private void addLoginhttp(HttpWebRequest httpWebRequest_0, iTunesUserInfo rsaccount_0)
|
|
{
|
|
httpWebRequest_0.Accept = "*/*";
|
|
httpWebRequest_0.Headers.Add("Accept-Encoding", "gzip");
|
|
httpWebRequest_0.Headers.Add("Accept-Language", "en;q=0");
|
|
httpWebRequest_0.Headers.Add("X-Apple-Client-Versions", "GameCenter/2.0");
|
|
httpWebRequest_0.Headers.Add("X-Apple-Connection-Type", "WiFi");
|
|
httpWebRequest_0.Headers.Add("X-Apple-Client-Application", "Software");
|
|
httpWebRequest_0.Headers.Add("X-Apple-Partner", "origin.0");
|
|
httpWebRequest_0.Headers.Add("X-Token-T", "M");
|
|
httpWebRequest_0.Headers.Add("X-Apple-Tz", "28800");
|
|
if (rsaccount_0 != null)
|
|
{
|
|
httpWebRequest_0.Headers.Add("X-Apple-Store-Front", "143465-19,17");
|
|
}
|
|
}
|
|
|
|
public string GetiTunesHtpp(HttpWebRequest httpWebRequest_0, ref string string_3, iTunesUserInfo user)
|
|
{
|
|
Stream stream = null;
|
|
HttpWebResponse httpWebResponse = null;
|
|
string outstring = "";
|
|
try
|
|
{
|
|
httpWebResponse = httpWebRequest_0.GetResponse() as HttpWebResponse;
|
|
if (httpWebResponse.StatusCode != HttpStatusCode.OK)
|
|
{
|
|
string_3 = httpWebResponse.Headers["location"];
|
|
return "";
|
|
}
|
|
stream = httpWebResponse.GetResponseStream();
|
|
byte[] array = new byte[8192];
|
|
MemoryStream memoryStream = new MemoryStream();
|
|
int num = stream.Read(array, 0, array.Length);
|
|
int num2 = 0 + num;
|
|
while (num != 0)
|
|
{
|
|
num = stream.Read(array, 0, array.Length);
|
|
num2 += num;
|
|
}
|
|
memoryStream.Write(array, 0, num2);
|
|
StringBuilder stringBuilder = new StringBuilder();
|
|
try
|
|
{
|
|
ReadZip(memoryStream, 0, (int)memoryStream.Length, stringBuilder, ref outstring);
|
|
outstring = stringBuilder.ToString().Replace("\0", "");
|
|
}
|
|
catch
|
|
{
|
|
outstring = Encoding.UTF8.GetString(memoryStream.ToArray());
|
|
}
|
|
memoryStream.Close();
|
|
string_3 = "";
|
|
if (user != null)
|
|
{
|
|
string[] values = httpWebResponse.Headers.GetValues("x-set-apple-store-front");
|
|
if (values == null || values.Length == 0)
|
|
{
|
|
return outstring;
|
|
}
|
|
string text = values[0];
|
|
if (string.Compare(user.StoredDescrption, text, ignoreCase: true) != 0)
|
|
{
|
|
user.IsAreaChanged = true;
|
|
user.StoredDescrption = text;
|
|
user.Area = GetAreaByDescription(text);
|
|
}
|
|
}
|
|
return outstring;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
APIUtlis.ApiSeriveError(ex);
|
|
return outstring;
|
|
}
|
|
finally
|
|
{
|
|
SetCookieByResponseHeader(user.PcookieContainer, httpWebResponse, ".apple.com", user);
|
|
httpWebRequest_0.GetResponse().GetResponseStream().Close();
|
|
if (stream != null)
|
|
{
|
|
stream.Close();
|
|
stream = null;
|
|
}
|
|
}
|
|
}
|
|
|
|
public void SetCookieByResponseHeader(CookieContainer cookieContainer_0, HttpWebResponse httpWebResponse_0, string string_0, iTunesUserInfo user)
|
|
{
|
|
if (string.IsNullOrEmpty(httpWebResponse_0.Headers["Set-Cookie"]))
|
|
{
|
|
return;
|
|
}
|
|
string[] array = httpWebResponse_0.Headers["Set-Cookie"].Replace("Expires", "expires").Split(',');
|
|
string empty = string.Empty;
|
|
string empty2 = string.Empty;
|
|
string path = string.Empty;
|
|
string text = string.Empty;
|
|
for (int i = 0; i < array.Length; i++)
|
|
{
|
|
if (array[i].IndexOf("expires=") != -1)
|
|
{
|
|
array[i] = array[i] + "," + array[i + 1];
|
|
string[] array2 = array[i].Split(';');
|
|
if (array2.Length < 2)
|
|
{
|
|
continue;
|
|
}
|
|
empty = array2[0].Split('=')[0];
|
|
empty2 = array2[0].Substring(empty.Length + 1);
|
|
for (int j = 1; j < array2.Length; j++)
|
|
{
|
|
if (array2[j].IndexOf("path=") != -1)
|
|
{
|
|
path = array2[j].Split('=')[1];
|
|
}
|
|
else if (array2[j].IndexOf("domain=") != -1)
|
|
{
|
|
text = array2[j].Split('=')[1];
|
|
}
|
|
}
|
|
if (string.IsNullOrEmpty(text))
|
|
{
|
|
text = httpWebResponse_0.ResponseUri.Host;
|
|
}
|
|
if (!string.IsNullOrEmpty(string_0))
|
|
{
|
|
text = string_0;
|
|
}
|
|
if (empty == "s_vi")
|
|
{
|
|
user.siv = empty2;
|
|
}
|
|
if (empty2 != string.Empty)
|
|
{
|
|
Cookie cookie = new Cookie(empty, empty2, path, text);
|
|
if (array[i].IndexOf("secure") > -1)
|
|
{
|
|
cookie.Secure = true;
|
|
}
|
|
if (array[i].IndexOf("HttpOnly") > -1)
|
|
{
|
|
cookie.HttpOnly = true;
|
|
}
|
|
cookieContainer_0.Add(cookie);
|
|
}
|
|
i++;
|
|
continue;
|
|
}
|
|
string[] array3 = array[i].Split(';');
|
|
if (array3.Length < 2)
|
|
{
|
|
continue;
|
|
}
|
|
empty = array3[0].Split('=')[0];
|
|
empty2 = array3[0].Substring(empty.Length + 1);
|
|
for (int k = 1; k < array3.Length; k++)
|
|
{
|
|
if (array3[k].IndexOf("path=") != -1)
|
|
{
|
|
path = array3[k].Split('=')[1];
|
|
}
|
|
else if (array3[k].IndexOf("domain=") != -1)
|
|
{
|
|
text = array3[k].Split('=')[1];
|
|
}
|
|
}
|
|
if (string.IsNullOrEmpty(text))
|
|
{
|
|
text = httpWebResponse_0.ResponseUri.Host;
|
|
}
|
|
if (!string.IsNullOrEmpty(string_0))
|
|
{
|
|
text = string_0;
|
|
}
|
|
if (empty2 != string.Empty)
|
|
{
|
|
Cookie cookie2 = new Cookie(empty, empty2, path, text);
|
|
if (array[i].IndexOf("secure") > -1)
|
|
{
|
|
cookie2.Secure = true;
|
|
}
|
|
if (array[i].IndexOf("HttpOnly") > -1)
|
|
{
|
|
cookie2.HttpOnly = true;
|
|
}
|
|
cookieContainer_0.Add(cookie2);
|
|
}
|
|
}
|
|
}
|
|
|
|
private static bool ReadZip(MemoryStream memoryStream, int intsize, int readcount, StringBuilder stringBuilder_0, ref string outstring)
|
|
{
|
|
memoryStream.Seek(0L, SeekOrigin.Begin);
|
|
GZipStream gZipStream = new GZipStream(memoryStream, CompressionMode.Decompress);
|
|
do
|
|
{
|
|
byte[] array = new byte[readcount];
|
|
intsize = gZipStream.Read(array, 0, readcount);
|
|
outstring = Encoding.UTF8.GetString(array);
|
|
stringBuilder_0.Append(outstring);
|
|
}
|
|
while (intsize > 0);
|
|
return true;
|
|
}
|
|
|
|
public string GetServerId(string UrlValue)
|
|
{
|
|
int num = UrlValue.IndexOf("https://p", StringComparison.InvariantCulture);
|
|
string text = UrlValue.Substring(num + "https://p".Length);
|
|
num = text.IndexOf("-buy");
|
|
if (num >= 0)
|
|
{
|
|
text = text.Substring(0, num);
|
|
}
|
|
return Convert.ToUInt64(text).ToString();
|
|
}
|
|
|
|
public string CreatePlistString(Dictionary<object, object> string_0)
|
|
{
|
|
StringBuilder stringBuilder = new StringBuilder();
|
|
stringBuilder.Append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<plist version=\"1.0\">\n\t<dict>\n");
|
|
foreach (KeyValuePair<object, object> item in string_0)
|
|
{
|
|
stringBuilder.Append("\t\t<key>");
|
|
stringBuilder.Append(item.Key.ToString());
|
|
stringBuilder.Append("</key>\n");
|
|
stringBuilder.Append("\t\t<string>");
|
|
stringBuilder.Append(item.Value.ToString());
|
|
stringBuilder.Append("</string>\n");
|
|
}
|
|
stringBuilder.Append("\t</dict>\n</plist>");
|
|
return stringBuilder.ToString();
|
|
}
|
|
|
|
public string GetKeyValue(string itemKey, string valueKey1, string valueKey2, string plist)
|
|
{
|
|
string text = "";
|
|
bool num = plist.Contains(itemKey);
|
|
int num2 = 0;
|
|
if (num)
|
|
{
|
|
try
|
|
{
|
|
num2 = plist.IndexOf(itemKey, StringComparison.InvariantCulture);
|
|
text = plist.Substring(num2 + itemKey.Length);
|
|
num2 = text.IndexOf(valueKey1, StringComparison.InvariantCulture);
|
|
text = text.Substring(num2 + valueKey1.Length);
|
|
num2 = text.IndexOf(valueKey2, StringComparison.InvariantCulture);
|
|
text = text.Substring(0, num2);
|
|
}
|
|
catch (ArgumentNullException)
|
|
{
|
|
}
|
|
}
|
|
return text.Trim();
|
|
}
|
|
|
|
public string GetAreaByDescription(string description)
|
|
{
|
|
if (string.IsNullOrEmpty(description))
|
|
{
|
|
return string.Empty;
|
|
}
|
|
LoadCountryCode();
|
|
string storeId = description;
|
|
int num = description.IndexOf("-");
|
|
if (num < 0)
|
|
{
|
|
num = description.IndexOf(",");
|
|
}
|
|
if (num > -1)
|
|
{
|
|
storeId = description.Substring(0, num);
|
|
}
|
|
return GetAreaByStoreId(storeId);
|
|
}
|
|
|
|
private void LoadCountryCode()
|
|
{
|
|
if (dataTable_0 == null || dataTable_0.Rows.Count == 0)
|
|
{
|
|
dataTable_0 = new DataTable();
|
|
dataTable_0.Columns.Clear();
|
|
dataTable_0.Columns.Add("id", typeof(string));
|
|
dataTable_0.Columns.Add("area", typeof(string));
|
|
dataTable_0.Columns.Add("description", typeof(string));
|
|
dataTable_0.Rows.Add("143465", "cn", "143465-19,12");
|
|
dataTable_0.Rows.Add("143465", "cn", "143465-19,17");
|
|
dataTable_0.Rows.Add("143470", "tw", "143470-18,12");
|
|
dataTable_0.Rows.Add("143463", "hk", "143463-18,12");
|
|
dataTable_0.Rows.Add("1434515", "mo", "1434515-18,12");
|
|
dataTable_0.Rows.Add("143441", "us", "143441-1,12");
|
|
dataTable_0.Rows.Add("143455", "ca", "143455-6,12");
|
|
dataTable_0.Rows.Add("143466", "kr", "143466,12");
|
|
dataTable_0.Rows.Add("143462", "jp", "143462-9,12");
|
|
dataTable_0.Rows.Add("143464", "sg", "143464-1,12");
|
|
dataTable_0.Rows.Add("143460", "au", "143460-27,17");
|
|
dataTable_0.Rows.Add("143560", "bn", "143560,12");
|
|
dataTable_0.Rows.Add("143476", "id", "143476-2,12");
|
|
dataTable_0.Rows.Add("143517", "kz", "143517,12");
|
|
dataTable_0.Rows.Add("143473", "my", "143473-2,12");
|
|
dataTable_0.Rows.Add("143461", "nz", "143461,12");
|
|
dataTable_0.Rows.Add("143477", "pk", "143477,12");
|
|
dataTable_0.Rows.Add("143474", "ph", "143474,12");
|
|
dataTable_0.Rows.Add("143486", "lk", "143486,12");
|
|
dataTable_0.Rows.Add("143475", "th", "143475,12");
|
|
dataTable_0.Rows.Add("143566", "uz", "143566,12");
|
|
dataTable_0.Rows.Add("143471", "vn", "143471-2,12");
|
|
dataTable_0.Rows.Add("143565", "by", "143565,12");
|
|
dataTable_0.Rows.Add("143446", "be", "143446-2,12");
|
|
dataTable_0.Rows.Add("143526", "bg", "143526,12");
|
|
dataTable_0.Rows.Add("143494", "hr", "143494,12");
|
|
dataTable_0.Rows.Add("143557", "cy", "143557,12");
|
|
dataTable_0.Rows.Add("143489", "cz", "143489,12");
|
|
dataTable_0.Rows.Add("143458", "dk", "143458-2,12");
|
|
dataTable_0.Rows.Add("143443", "de", "143443,12");
|
|
dataTable_0.Rows.Add("143454", "es", "143454-8,12");
|
|
dataTable_0.Rows.Add("143518", "ee", "143518,12");
|
|
dataTable_0.Rows.Add("143447", "fi", "143447-2,12");
|
|
dataTable_0.Rows.Add("143442", "fr", "143442,12");
|
|
dataTable_0.Rows.Add("143448", "gr", "143448,12");
|
|
dataTable_0.Rows.Add("143482", "hu", "143482,12");
|
|
dataTable_0.Rows.Add("143558", "is", "143558,12");
|
|
dataTable_0.Rows.Add("143449", "ie", "143449,12");
|
|
dataTable_0.Rows.Add("143450", "it", "143450,12");
|
|
dataTable_0.Rows.Add("143519", "lv", "143519,12");
|
|
dataTable_0.Rows.Add("143520", "lt", "143520,12");
|
|
dataTable_0.Rows.Add("143451", "lu", "143451-2,12");
|
|
dataTable_0.Rows.Add("143530", "mk", "143530,12");
|
|
dataTable_0.Rows.Add("143521", "mt", "143521,12");
|
|
dataTable_0.Rows.Add("143523", "md", "143523,12");
|
|
dataTable_0.Rows.Add("143452", "nl", "143452,12");
|
|
dataTable_0.Rows.Add("143457", "no", "143457-2,12");
|
|
dataTable_0.Rows.Add("143445", "at", "143445,12");
|
|
dataTable_0.Rows.Add("143478", "pl", "143478,12");
|
|
dataTable_0.Rows.Add("143453", "pt", "143453-2,12");
|
|
dataTable_0.Rows.Add("143487", "ro", "143487,12");
|
|
dataTable_0.Rows.Add("143496", "sk", "143496,12");
|
|
dataTable_0.Rows.Add("143499", "si", "143499,12");
|
|
dataTable_0.Rows.Add("143456", "se", "143456-2,12");
|
|
dataTable_0.Rows.Add("143459", "ch", "143459-2,12");
|
|
dataTable_0.Rows.Add("143480", "tr", "143480-2,12");
|
|
dataTable_0.Rows.Add("143444", "gb", "143444,12");
|
|
dataTable_0.Rows.Add("143469", "ru", "143469,12");
|
|
dataTable_0.Rows.Add("143563", "dz", "143563,12");
|
|
dataTable_0.Rows.Add("143564", "ao", "143564,12");
|
|
dataTable_0.Rows.Add("143524", "am", "143524,12");
|
|
dataTable_0.Rows.Add("143568", "az", "143568,12");
|
|
dataTable_0.Rows.Add("143559", "bh", "143559,12");
|
|
dataTable_0.Rows.Add("143525", "bw", "143525,12");
|
|
dataTable_0.Rows.Add("143516", "eg", "143516,12");
|
|
dataTable_0.Rows.Add("143573", "gh", "143573,12");
|
|
dataTable_0.Rows.Add("143467", "in", "143467,12");
|
|
dataTable_0.Rows.Add("143491", "il", "143491,12");
|
|
dataTable_0.Rows.Add("143528", "jo", "143528,12");
|
|
dataTable_0.Rows.Add("143529", "ke", "143529,12");
|
|
dataTable_0.Rows.Add("143493", "kw", "143493,12");
|
|
dataTable_0.Rows.Add("143497", "lb", "143497,12");
|
|
dataTable_0.Rows.Add("143531", "mg", "143531,12");
|
|
dataTable_0.Rows.Add("143532", "ml", "143532,12");
|
|
dataTable_0.Rows.Add("143533", "mu", "143533,12");
|
|
dataTable_0.Rows.Add("143534", "ne", "143534,12");
|
|
dataTable_0.Rows.Add("143561", "ng", "143561,12");
|
|
dataTable_0.Rows.Add("143562", "om", "143562,12");
|
|
dataTable_0.Rows.Add("143498", "qa", "143498,12");
|
|
dataTable_0.Rows.Add("143479", "sa", "143479,12");
|
|
dataTable_0.Rows.Add("143535", "sn", "143535,12");
|
|
dataTable_0.Rows.Add("143472", "za", "143472,12");
|
|
dataTable_0.Rows.Add("143572", "tz", "143572,12");
|
|
dataTable_0.Rows.Add("143536", "tn", "143536,12");
|
|
dataTable_0.Rows.Add("143481", "ae", "143481,12");
|
|
dataTable_0.Rows.Add("143537", "ug", "143537,12");
|
|
dataTable_0.Rows.Add("143571", "ye", "143571,12");
|
|
dataTable_0.Rows.Add("143538", "ai", "143538,12");
|
|
dataTable_0.Rows.Add("143540", "ag", "143540,12");
|
|
dataTable_0.Rows.Add("143505", "ar", "143505-2,12");
|
|
dataTable_0.Rows.Add("143539", "bs", "143539,12");
|
|
dataTable_0.Rows.Add("143541", "bb", "143541,12");
|
|
dataTable_0.Rows.Add("143555", "bz", "143555-2,12");
|
|
dataTable_0.Rows.Add("143542", "bm", "143542,12");
|
|
dataTable_0.Rows.Add("143556", "bo", "143556-2,12");
|
|
dataTable_0.Rows.Add("143503", "br", "143503,12");
|
|
dataTable_0.Rows.Add("143543", "vg", "143543,12");
|
|
dataTable_0.Rows.Add("143544", "ky", "143544,12");
|
|
dataTable_0.Rows.Add("143483", "cl", "143483-2,12");
|
|
dataTable_0.Rows.Add("143501", "co", "143501-2,12");
|
|
dataTable_0.Rows.Add("143495", "cr", "143495-2,12");
|
|
dataTable_0.Rows.Add("143545", "dm", "143545,12");
|
|
dataTable_0.Rows.Add("143508", "do", "143508-2,12");
|
|
dataTable_0.Rows.Add("143509", "ec", "143509-2,12");
|
|
dataTable_0.Rows.Add("143506", "sv", "143506-2,12");
|
|
dataTable_0.Rows.Add("143546", "gd", "143546,12");
|
|
dataTable_0.Rows.Add("143504", "gt", "143504-2,12");
|
|
dataTable_0.Rows.Add("143553", "gy", "143553,12");
|
|
dataTable_0.Rows.Add("143510", "hn", "143510-2,12");
|
|
dataTable_0.Rows.Add("143511", "jm", "143511,12");
|
|
dataTable_0.Rows.Add("143468", "mx", "143468,12");
|
|
dataTable_0.Rows.Add("143547", "ms", "143547,12");
|
|
dataTable_0.Rows.Add("143512", "ni", "143512-2,12");
|
|
dataTable_0.Rows.Add("143485", "pa", "143485-2,12");
|
|
dataTable_0.Rows.Add("143513", "py", "143513-2,12");
|
|
dataTable_0.Rows.Add("143507", "pe", "143507-2,12");
|
|
dataTable_0.Rows.Add("143548", "kn", "143548,12");
|
|
dataTable_0.Rows.Add("143549", "lc", "143549,12");
|
|
dataTable_0.Rows.Add("143550", "vc", "143550,12");
|
|
dataTable_0.Rows.Add("143554", "sr", "143554-2,12");
|
|
dataTable_0.Rows.Add("143551", "tt", "143551,12");
|
|
dataTable_0.Rows.Add("143552", "tc", "143552,12");
|
|
dataTable_0.Rows.Add("143514", "uy", "143514-2,12");
|
|
dataTable_0.Rows.Add("143502", "ve", "143502-2,12");
|
|
}
|
|
}
|
|
|
|
private string GetAreaByStoreId(string storeId)
|
|
{
|
|
IEnumerator enumerator = null;
|
|
if (string.IsNullOrEmpty(storeId))
|
|
{
|
|
return string.Empty;
|
|
}
|
|
string result = string.Empty;
|
|
try
|
|
{
|
|
enumerator = dataTable_0.Rows.GetEnumerator();
|
|
while (enumerator.MoveNext())
|
|
{
|
|
DataRow dataRow = (DataRow)enumerator.Current;
|
|
string strB = dataRow["id"].ToString();
|
|
if (string.Compare(storeId, strB, ignoreCase: true) == 0)
|
|
{
|
|
result = dataRow["area"].ToString();
|
|
}
|
|
}
|
|
return result;
|
|
}
|
|
finally
|
|
{
|
|
if (enumerator is IDisposable)
|
|
{
|
|
(enumerator as IDisposable).Dispose();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|