日期:2014-05-17 浏览次数:20729 次
protected void btnChangeString_Click(object sender, EventArgs e)
{
txtNewAddress.Text = StringConverter.checkString(txtSourceString.Text.Trim());
}
int TypeID=999;
txtNewAddress.Text = StringConverter.checkString(txtSourceString.Text.Trim(),out TypeID);
public static string checkString(string address, out int txtTypeID)
{
string addressTpye = address.Substring(0, 1).ToLower();
if (addressTpye == "a")
{
txtTypeID =1;
return txtChange(sourceString);
}
else
{
if (addressTpye == "b")
{
txtTypeID =2;
return txtChange(sourceString);
}
else
{
txtTypeID =3;
return txtChange(sourceString);
}
}
public string[] checkString(string txtvalue)
{
string[] txtchange = new String[2];
string addressTpye = txtvalue.Substring(0, 1).ToLower();
if (addressTpye == "a")
{
txtchange[0] = "1";
txtchange[1] = "A";
}
else
{
if (addressTpye == "a")
{
txtchange[0] = "2";
&n