关于页面事务

 con_All = Css2DataAccess.GetConnection(Nothing, "css2")            

tran_All = con_All.BeginTransaction("tran_All")

            '1.调用存储过程SP_MAIN_INVOICE,取出库单号;2插入主单

            '初始出库单号为1            

aPara_All(1).Value = 1            

Try                

Css2DataAccess.ExecuteNonQuery(tran_All, CommandType.StoredProcedure, "SP_MAIN_INVOICE", aPara_All)                

' Response.Write(aPara_All(8).Value & "," & aPara_All(1).Value)                

If aPara_All(8).Value > 0 Then                  

   ErrorNo = 5000 + aPara_All(8).Value                   

  '刚刚(10分钟内)已经执过货,请不要重复执货.                    

If aPara_All(8).Value = 11 Then                        

TempErrorMessage = TempErrorMessage & Resources.CommonLan.Msg_Invoice_Repeat & "<br>"                    

End If                

Else                    

CheckNo = aPara_All(1).Value                

End If            

Catch ex As Exception               

  TempErrorMessage = TempErrorMessage & ex.Message & "<br>"                

ErrorNo = 500            

End Try

      'tran_All.Commit()            

     ''插入主单成功,则插入子单

 

注:invoice.aspx

posted @ 2012-06-20 13:42  withoutaword  阅读(149)  评论(0编辑  收藏  举报