原本
if (result.Rows.Count == 0)
{
km.SQLExecute("INSERT INTO MGMES.dbo.PACKAGE_SN_FILL() VALUE () ");
}
else
{
String show5_4_1 = result.Rows[0].ItemArray[0].ToString();
}
string show5_4_1_ADD1 = show5_4_1.Substring(1, 5); //這時候 show_5_4_1 不能使用
改成
string show5_4_1="";
if (result.Rows.Count == 0)
{
km.SQLExecute("INSERT INTO MGMES.dbo.PACKAGE_SN_FILL() VALUE () ");
}
else
{
show5_4_1 = result.Rows[0].ItemArray[0].ToString();
}
string show5_4_1_ADD1 = show5_4_1.Substring(1, 5); //可以使用了
if (result.Rows.Count == 0)
{
km.SQLExecute("INSERT INTO MGMES.dbo.PACKAGE_SN_FILL() VALUE () ");
}
else
{
String show5_4_1 = result.Rows[0].ItemArray[0].ToString();
}
string show5_4_1_ADD1 = show5_4_1.Substring(1, 5); //這時候 show_5_4_1 不能使用
改成
string show5_4_1="";
if (result.Rows.Count == 0)
{
km.SQLExecute("INSERT INTO MGMES.dbo.PACKAGE_SN_FILL() VALUE () ");
}
else
{
show5_4_1 = result.Rows[0].ItemArray[0].ToString();
}
string show5_4_1_ADD1 = show5_4_1.Substring(1, 5); //可以使用了
沒有留言:
張貼留言