Ejemplo n.º 1
0
 public Int64 getHeaderID()
 {
     Database db = new Database();
     SqlParameter[] param = { db.MakeOutParam("@HeaderID", SqlDbType.BigInt, 0) };
     try
     {
         db.execNonQuery("EDI_MsgHeaderID_Get", param);
         Int64 idNum = Convert.ToInt64(param[0].Value.ToString());
         db.Close();
         return idNum;
     }
     catch (Exception ex)
     {
         if (db.IsOpen() == "Open") db.Close();
         log.writeToAppLog("ERROR", "Unable to get the headerID.\r\n" + ex.ToString(), "", "");
         throw new Exception(ex.ToString());
     }
 }