using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace
Agware_Sales_Extract
{
public static class StateStuff
{
public static string GetStateIdByName(string
stateName)
{
switch (stateName.ToUpper())
{
case "ALABAMA":
return "AL";
case "ALASKA":
return "AK";
case "AMERICAN
SAMOA":
return "AS";
case "ARIZONA":
return "AZ";
case "ARKANSAS":
return "AR";
case "CALIFORNIA":
return "CA";
case "COLORADO":
return "CO";
case "CONNECTICUT":
return "CT";
case "DELAWARE":
return "DE";
case "DISTRICT OF
COLUMBIA":
return "DC";
case "FEDERATED
STATES OF MICRONESIA":
return "FM";
case "FLORIDA":
return "FL";
case "GEORGIA":
return "GA";
case "GUAM":
return "GU";
case "HAWAII":
return "HI";
case "IDAHO":
return "ID";
case "ILLINOIS":
return "IL";
case "INDIANA":
return "IN";
case "IOWA":
return "IA";
case "KANSAS":
return "KS";
case "KENTUCKY":
return "KY";
case "LOUISIANA":
return "LA";
case "MAINE":
return "ME";
case "MARSHALL
ISLANDS":
return "MH";
case "MARYLAND":
return "MD";
case "MASSACHUSETTS":
return "MA";
case "MICHIGAN":
return "MI";
case "MINNESOTA":
return "MN";
case "MISSISSIPPI":
return "MS";
case "MISSOURI":
return "MO";
case "MONTANA":
return "MT";
case
"NEBRASKA":
return "NE";
case "NEVADA":
return "NV";
case "NEW
HAMPSHIRE":
return "NH";
case "NEW
JERSEY":
return "NJ";
case "NEW
MEXICO":
return "NM";
case "NEW YORK":
return "NY";
case "NORTH
CAROLINA":
return "NC";
case "NORTH
DAKOTA":
return "ND";
case "NORTHERN
MARIANA ISLANDS":
return "MP";
case "OHIO":
return "OH";
case "OKLAHOMA":
return "OK";
case "OREGON":
return "OR";
case "PALAU":
return "PW";
case "PENNSYLVANIA":
return "PA";
case "PUERTO
RICO":
return "PR";
case "RHODE
ISLAND":
return "RI";
case "SOUTH
CAROLINA":
return "SC";
case "SOUTH
DAKOTA":
return "SD";
case "TENNESSEE":
return "TN";
case "TEXAS":
return "TX";
case "UTAH":
return "UT";
case "VERMONT":
return "VT";
case "VIRGIN
ISLANDS":
return "VI";
case "VIRGINIA":
return "VA";
case "WASHINGTON":
return "WA";
case "WEST
VIRGINIA":
return "WV";
case "WISCONSIN":
return "WI";
case "WYOMING":
return "WY";
}
return ("State Not
Available:" + stateName);
}
public static string GetState(string
stateId)
{
switch (stateId)
{
case "AL":
return "ALABAMA";
case "AK":
return "ALASKA";
case "AS":
return "AMERICAN
SAMOA";
case "AZ":
return "ARIZONA";
case "AR":
return "ARKANSAS";
case "CA":
return "CALIFORNIA";
case "CO":
return "COLORADO";
case "CT":
return "CONNECTICUT";
case "DE":
return "DELAWARE";
case "DC":
return "DISTRICT OF
COLUMBIA";
case "FM":
return "FEDERATED
STATES OF MICRONESIA";
case "FL":
return "FLORIDA";
case "GA":
return "GEORGIA";
case "GU":
return "GUAM";
case "HI":
return "HAWAII";
case "ID":
return "IDAHO";
case
"IL":
return "ILLINOIS";
case "IN":
return "INDIANA";
case "IA":
return "IOWA";
case "KS":
return "KANSAS";
case "KY":
return "KENTUCKY";
case "LA":
return "LOUISIANA";
case "ME":
return "MAINE";
case "MH":
return "MARSHALL
ISLANDS";
case "MD":
return "MARYLAND";
case "MA":
return "MASSACHUSETTS";
case "MI":
return "MICHIGAN";
case "MN":
return "MINNESOTA";
case "MS":
return "MISSISSIPPI";
case "MO":
return "MISSOURI";
case "MT":
return "MONTANA";
case "NE":
return "NEBRASKA";
case "NV":
return "NEVADA";
case "NH":
return "NEW
HAMPSHIRE";
case "NJ":
return "NEW
JERSEY";
case "NM":
return "NEW MEXICO";
case "NY":
return "NEW
YORK";
case "NC":
return "NORTH
CAROLINA";
case "ND":
return "NORTH
DAKOTA";
case "MP":
return "NORTHERN
MARIANA ISLANDS";
case "OH":
return "OHIO";
case "OK":
return "OKLAHOMA";
case "OR":
return "OREGON";
case "PW":
return "PALAU";
case "PA":
return "PENNSYLVANIA";
case "PR":
return "PUERTO
RICO";
case "RI":
return "RHODE
ISLAND";
case "SC":
return "SOUTH CAROLINA";
case "SD":
return "SOUTH
DAKOTA";
case "TN":
return "TENNESSEE";
case "TX":
return "TEXAS";
case "UT":
return "UTAH";
case "VT":
return "VERMONT";
case "VI":
return "VIRGIN
ISLANDS";
case "VA":
return "VIRGINIA";
case "WA":
return
"WASHINGTON";
case "WV":
return "WEST
VIRGINIA";
case "WI":
return "WISCONSIN";
case "WY":
return "WYOMING";
}
return ("State Not
Available:" + stateId);
}
}
}
No comments:
Post a Comment